jburzynski / TypeGen

Single-class-per-file C# to TypeScript generator
MIT License
195 stars 55 forks source link

csNullableTranslation with null|optional values #177

Open amellini opened 11 months ago

amellini commented 11 months ago

Hi all, I need to map some Dto's with a base classe (BaseDto) with some nullable properties, in my Angular app I use this dto but I have to set nullable properties value that are nullable too otherwise i get an error. Theres a wai to set csNullableTranslation to "null|optional" or something to have this:

export interface BaseDto { Id: string; TimeStamp?: number[] | null; }

instead of export interface BaseDto { Id?: string; TimeStamp: number[] | null; }

thank you