You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use the ForceNullable Attribute on Class/Interface Level so that all Properties of the Class/Interface are optional in the resulting ts.
=>
Forces all properties to be nullable. E.g. field:boolean becomes field?:boolean when you specify [TsInterface(ForceNullable = true)] in attribute configuration
Is that something that could be interesting to others?
The text was updated successfully, but these errors were encountered:
You can do almost the same thing using fluent configuration already - so you can specify
.With*Properties(c=>c.ForceNullable());
I'm not sure that it is necessary to add it to attributes configuration because it may be confusing when you have already specified ForceNullable for all the properties and then you suddenly decided to make one/two/three properties not nullable. Now it is much more flexible to use fluent configuration for that, but if someone else is interested then I can implement.
thanks for that snippet. I have to admit i did not check out the fluent configuration yet.
works great and this suits me much better than attribute configuration anyways.
I would like to use the ForceNullable Attribute on Class/Interface Level so that all Properties of the Class/Interface are optional in the resulting ts.
=>
Forces all properties to be nullable. E.g. field:boolean becomes field?:boolean when you specify [TsInterface(ForceNullable = true)] in attribute configuration
Is that something that could be interesting to others?
The text was updated successfully, but these errors were encountered: