Open WesSouza opened 4 days ago
Describe the bug
When enabling TypeScript's exactOptionalPropertyTypes, optional types marked with ? must also accept undefined as a value.
exactOptionalPropertyTypes
?
undefined
No @atproto optional allow this.
@atproto
To Reproduce
https://codesandbox.io/p/sandbox/xlcg3k?file=%2Fsrc%2Findex.ts%3A10%2C16
Expected behavior
Optional properties should be expressed as:
type Example = { optional?: string | undefined }
Details
Describe the bug
When enabling TypeScript's
exactOptionalPropertyTypes
, optional types marked with?
must also acceptundefined
as a value.No
@atproto
optional allow this.To Reproduce
https://codesandbox.io/p/sandbox/xlcg3k?file=%2Fsrc%2Findex.ts%3A10%2C16
Expected behavior
Optional properties should be expressed as:
Details