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
Add builder pattern style methods to avoid defaults having to be defined twice for Changing Default Nullability. This helps with ergonomics and readability of these options.
withDefaultFieldNullability
withDefaultInputFieldRequiredness
-export const builder = new SchemaBuilder<{- DefaultFieldNullability: true;-}>({- defaultFieldNullability: true,-});+const builder = new SchemaBuilder({}).withDefaultFieldNullability();
-const builder = new SchemaBuilder<{- DefaultInputFieldRequiredness: true;-}>({- defaultInputFieldRequiredness: true,-});+const builder = new SchemaBuilder({}).withDefaultInputFieldRequiredness()
Putting it the builder pattern together would end up as:
Looking into changing how nullability works in v4, so not sure this would be worth doing right now. Typescript 5.2 iteration plan mentions investigating some stuff related to partial inference, so that may provide a better way to handle this as well
Add builder pattern style methods to avoid defaults having to be defined twice for Changing Default Nullability. This helps with ergonomics and readability of these options.
withDefaultFieldNullability
withDefaultInputFieldRequiredness
Putting it the builder pattern together would end up as:
Related to #910 & #914
The text was updated successfully, but these errors were encountered: