-
Notifications
You must be signed in to change notification settings - Fork 24
Generation Options
Pavel Vostretsov edited this page May 9, 2023
·
1 revision
Use /* eslint-disable */
or // tslint:disable
comment in generated files. EsLint
is default option.
This option is enabled by default. When enabled produces optional properties for members which may contain nulls.
export type SomeType = {
somePropertyWithNullableValue?: typeDefinition;
somePropertyWithNonNullableValue: typeDefinition;
};
When disabled, all properties produced as required.
This option is disabled by default. When enabled, global Nullable<T>
is used instead of union null | T
NullabilityMode has 4 options:
- None - all generated properties are not null
- Pessimistic (default) - generates
Nullable
property for properties that have no JetBrains nullability attributes - Optimistic - generates not null property for properties that have no JetBrains nullability attributes
- NullableReference - generates not null properties based on C# 8 Nullable Reference Type attributes
Options Pessimistic
or Optimistic
can be combined with NullableReference
option, this way generator first looks for C# 8 Nullable Reference Type attributes, then JetBrains nullability attributes
Generated content marker to use instead of default // TypeScriptContractGenerator's generated content
that is present in all generated files