Skip to content

Commit

Permalink
Merge pull request #1808 from martyfitzer-ids/patch-1
Browse files Browse the repository at this point in the history
Add json decorator options to TS type
  • Loading branch information
radex authored Jul 5, 2024
2 parents d4be481 + 6acae3c commit 693c167
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/decorators/json/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import Model from '../../Model'

export type Sanitizer = (source: any, model?: Model) => any

declare function json(rawFieldName: ColumnName, sanitizer: Sanitizer): PropertyDecorator
export type Options = {
/** Use cached value if possible rather than sanitizing the raw value for every read. Default: `false` */
memo: boolean;
}

declare function json(rawFieldName: ColumnName, sanitizer: Sanitizer, options?: Options): PropertyDecorator

export default json

0 comments on commit 693c167

Please sign in to comment.