future/useForm: Type regression in v1.13.0 with defaultValue #1071
Closed
transparent-citizen
started this conversation in
General
Replies: 1 comment 2 replies
-
|
@transparent-citizen Looks like I tested it without |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Imagine a schema with a required and an optional property.
✅ Partial default values work fine:
✅ null default values work fine:
✅ If a field is optional, undefined default values work fine:
❌ If a field is required, undefined default values throw a type error:
Note that
exactOptionalPropertyTypesis set totruein tsconfig.json.This used to work in v1.12.1, so it might be an oversight from the
defaultValuerevamp from v1.13.0?Beta Was this translation helpful? Give feedback.
All reactions