Is there a way to turn this code
export class person {
@IsString()
@Column('text')
name: string
@IsOptional()
@IsString()
@Column('text')
description?: string
}
Into something that resembles this
export class person {
name: string
description?: string
}
I'm aware that decorators are needed, but SSOT seems lost when property type has to be declared three times or more per property.
Is there an easier way around this? JOI? Schema generation?