[TypeScript] Type {} does not satisfy the constraint 'SerializableParam'
See original GitHub issueNot so much of a bug as a work around in case anyone runs into a similar problem. When typing any param
parameter (eg atomFamily) the error:
Type {} does not satisfy the constraint ‘SerializableParam’
will appear and can be overcome by unioning the two types together as such:
type paramType = SerializableParam & {
id: number
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Type 'keyof T' does not satisfy the constraint - Stack Overflow
I get this error despite the validation working. All I need is a function that generates another function using an object ...
Read more >Type does not satisfy constraint when using one ... - YouTrack
Type does not satisfy constraint when using one type parameter in constraint of other type parameter ; Project, ReSharper ; Subsystem, TypeScript ;...
Read more >type 'matdatepickercontrol<unknown>' does not satisfy the ...
I did have TypeScript 4.7 but tried upgrading after getting the error below (it did not make any difference). The errors I now...
Read more >Why is my Pick<> failing with "Type does not satisfy ... - Reddit
r/typescript icon ... Why is my Pick<> failing with "Type does not satisfy the constraint"? ... ionIcons"; type Icon = keyof typeof Icons;....
Read more >TypeScript recoil cheat sheet - SaltyCrane
TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. This is a list of TypeScript types for recoil generated from...
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
Change from interface to type worked for me
That’s one weird solution, but as long as it works. 🥇