-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: this.attribute(name) should fallback to Literal (#353)
```ts class Foo { @column(TEXT) get settings(): Record<string, any> { // this.attribute('settings') should return the original union type here const text = this.attribute('settings') as string; if (!text) return null; try { return JSON.parse(text); } catch { return null; } } } ```
- Loading branch information
Showing
2 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters