Type 'Balance' does not satisfy the constraint 'CompactEncodable'.
See original GitHub issueSeeing this error when running tsc
appear after upgrading to v1.1.1
Type 'Balance' does not satisfy the constraint 'CompactEncodable'.
Complains about missing toNumber
215 public get tip (): Compact<Balance> {
~~~~~~~
node_modules/@polkadot/types/codec/Compact.d.ts:9:5
9 toNumber(): number;
~~~~~~~~~~~~~~~~~~~
'toNumber' is declared here.
Seems like some typescript inference is missing
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Error "Type 'S' does not satisfy the constraint 'IValueMap'" with ...
1 in a project that uses TypeScript 4.8, I get the following compiler error: node_modules/mobx-react/dist/inject.d.ts:5:63 - error TS2344: Type ...
Read more >Type 'S' does not satisfy the constraint 'JSONSchema' in ...
It's because your type ValidatedAPIGatewayProxyEvent<S> takes a type argument S , with no constraints, but then passes it into FromSchema<S> ...
Read more >Incorrect, "Type does not satisfy the constraint" error when ...
Incorrect, "Type does not satisfy the constraint" error when using constraints with primitive types ... The following code is in fact valid, compiles...
Read more >Typescript error "does not satisfy the constraint new" when ...
Integrating with an API where a boolean can only be undefined or true I needed to type it. It's easy enough but I...
Read more >Why is my Pick<> failing with "Type does not satisfy ... - Reddit
I have a file called ionIcons.ts. It contains a list of var delcarations. export declare var accessibility: string; export declare var…
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 Free
Top 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
PS: 1.2.1 does have a dependency gap (fixed in master) where it needs @types/bn.js installed as well (the dep was not listed). Just a heads up.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.