Currently, TypeGen does not provide a TypeAnnotations attribute to mark a property or field as required in the generated TypeScript code. This is needed to generate fields with the non-null assertion operator (!), which indicates that the field is required but not initialized in the constructor.
Expected behavior:
Introduce a [TsRequired] attribute.
When applied, the generated TypeScript property should use the ! operator.
This should work for both properties and fields.
Use case:
This is useful for strict TypeScript projects where required fields must be explicitly marked, improving type safety and compatibility with TypeScript's strict property initialization checks.
Currently, TypeGen does not provide a TypeAnnotations attribute to mark a property or field as required in the generated TypeScript code. This is needed to generate fields with the non-null assertion operator (!), which indicates that the field is required but not initialized in the constructor.
Expected behavior:
Introduce a [TsRequired] attribute.
When applied, the generated TypeScript property should use the ! operator.
This should work for both properties and fields.
Use case:
This is useful for strict TypeScript projects where required fields must be explicitly marked, improving type safety and compatibility with TypeScript's strict property initialization checks.