TS 4.4: `exactOptionalPropertyTypes: true` support
See original GitHub issueTypeScript 4.4’s release is around the corner, and I’m testing it right now.
I’m hitting issues with csstype
as properties are optional but do not explicitly allow undefined
, for example
left?: Property.Left<TLength>;
should be
left?: Property.Left<TLength> | undefined;
https://devblogs.microsoft.com/typescript/announcing-typescript-4-4-rc/
Support for this would be nice.
For reference: https://github.com/adazzle/react-data-grid/pull/2566
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Documentation - TypeScript 4.4
Exact Optional Property Types ( --exactOptionalPropertyTypes ). In JavaScript, reading a missing property on an object produces the value undefined . It's also ......
Read more >Support TypeScript 4.4 exactOptionalPropertyTypes #1919
Typescript 4.4 introduced a new feature, exactOptionalPropertyTypes. The default value is false but the recommended value is true.
Read more >Announcing TypeScript 4.4 - Microsoft Developer Blogs
Defaulting to the unknown Type in Catch Variables ( --useUnknownInCatchVariables ); Exact Optional Property Types ( --exactOptionalPropertyTypes ) ...
Read more >Support TypeScript tsconfig flag `exactOptionalPropertyTypes
The flag tsconfig.json:compilerOptions.exactOptionalPropertyTypes set to true is not compatible with the exported types in .d.ts files from @ ...
Read more >TypeScript 4.4: The Good, The Bad and The Not So Bad
The isString condition wasn't able to let TS know that, when it's true, the arg is a string . As a result, TS...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Released in 3.0.10
My first thought was that maybe it would be expected to fail so you’re notified when something can be removed. But I guess you’re right. This would be annoying: