class-transformer#Type TypeScript Examples
The following examples show how to use
class-transformer#Type.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: classes.ts From epicgames-freegames-node with MIT License | 6 votes |
/**
* Global default notification configuration.
*
* You may configure multiple notifiers, and they will all be triggered simultaneously.
*/
@IsOptional()
@ValidateNested()
@IsArray()
@Type(() => NotifierConfig, {
discriminator: {
property: 'type',
subTypes: notifierSubtypes,
},
})
notifiers?: AnyNotifierConfig[];
Example #2
Source File: entity-list-relation-filter.template.ts From amplication with Apache License 2.0 | 6 votes |
@ApiProperty({
required: false,
type: () => WHERE_INPUT,
})
@ValidateNested()
@Type(() => WHERE_INPUT)
@IsOptional()
@Field(() => WHERE_INPUT, {
nullable: true,
})
every?: WHERE_INPUT;
Example #3
Source File: classes.ts From epicgames-freegames-node with MIT License | 6 votes |
/**
* Notification options for just this account. This overrides any global notification configs.
*
* You may configure multiple notifiers, and they will all be triggered simultaneously.
*/
@IsOptional()
@ValidateNested()
@IsArray()
@Type(() => NotifierConfig, {
discriminator: {
property: 'type',
subTypes: notifierSubtypes,
},
})
notifiers?: AnyNotifierConfig[];
Example #4
Source File: BooleanFilter.ts From amplication with Apache License 2.0 | 6 votes |
@ApiProperty({
required: false,
type: Boolean,
})
@IsOptional()
@Field(() => Boolean, {
nullable: true,
})
@Type(() => Boolean)
equals?: boolean;
Example #5
Source File: ens-root-nodes.ts From etherspot-sdk with MIT License | 5 votes |
@Type(() => ENSRootNode)
items: ENSRootNode[];
Example #6
Source File: filter-survey-point.dto.ts From aqualink-app with MIT License | 5 votes |
@ApiProperty({ example: 1 })
@IsOptional()
@Type(() => Number)
@IsInt()
readonly siteId?: number;