question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[TypeScript] Type {} does not satisfy the constraint 'SerializableParam'

See original GitHub issue

Not 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:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kaynetpccommented, Jul 13, 2022

Change from interface to type worked for me

0reactions
KonkretneKosteczkicommented, Oct 6, 2022

Change from interface to type worked for me

That’s one weird solution, but as long as it works. 🥇

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found