[BUG] Derived types not resolved in TypeScript 3.9
See original GitHub issueTo reproduce:
- Make a type with a derived member
- See that
ResolveState
correctly unwraps theDerive
type in TS 3.8: - Change TS to 3.9 and see that the type is no longer unwrapped:
- Any attempt to use the derived state will not compile.
Not sure if this is a TS bug or just a result of stricter type checking in 3.9…
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Documentation - TypeScript 3.9
The function's types declare that it takes two string s so that other TypeScript users can get type-checking errors, but it also does...
Read more >Documentation - Advanced Types - TypeScript
This page lists some of the more advanced ways in which you can model types, it works in tandem with the Utility Types...
Read more >Documentation - Type Compatibility - TypeScript
Type compatibility in TypeScript is based on structural subtyping. ... When a type system has this property, it is said to not be...
Read more >Documentation - TypeScript 3.8
Type -Only Imports and Export. This feature is something most users may never have to think about; however, if you've hit issues under...
Read more >Documentation - TypeScript 3.7
yell(str) { · assert(typeof str === "string"); · return str.toUppercase(); · // ~~~~~~~~~~~ · // error: Property 'toUppercase' does not exist on type...
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
Next release will fix this once and for all, also giving some new capabilities. Stay tuned tomorrow 😄
Okay, this still does not fix
Derive
… but it is necessary to move to TS 3.9. So thederived
is the way to go as that is the only way currently known to handle the circular typing of derived state.