bug: Type 'T' does not satisfy the constraint 'object'
kieran-s opened this issue · 3 comments
kieran-s commented
Is there an existing issue for this?
- I have searched the existing issues
Description of the bug
Using DiscordJS and typescript, when I try to build using TSC, I get errors in sapphire/shapeshift
node_modules/@sapphire/shapeshift/dist/index.d.ts:590:44 - error TS2344: Type 'T' does not satisfy the constraint 'object'.
590 declare type SchemaOf<T> = ObjectValidator<T>;
~
node_modules/@sapphire/shapeshift/dist/index.d.ts:590:23
590 declare type SchemaOf<T> = ObjectValidator<T>;
~
This type parameter might need an `extends object` constraint.
node_modules/@sapphire/shapeshift/dist/index.d.ts:641:65 - error TS2344: Type 'T' does not satisfy the constraint 'object'.
641 object<T>(shape: MappedObjectValidator<T>): ObjectValidator<T, UndefinedToOptional<T>>;
~
node_modules/@sapphire/shapeshift/dist/index.d.ts:641:12
641 object<T>(shape: MappedObjectValidator<T>): ObjectValidator<T, UndefinedToOptional<T>>;
~
This type parameter might need an `extends object` constraint.
Found 2 errors in the same file, starting at: node_modules/@sapphire/shapeshift/dist/index.d.ts:590
Steps To Reproduce
- Setup a project using DiscordJS14 and typescript
- Build using TSC
Expected behavior
Builds properly
Screenshots
No response
Additional context
No response
imranbarbhuiya commented
Duplicate of #193
check the reply in that issue
favna commented
Closing as per the above comment
kieran-s commented
Ah thanks, missed that issue!
Using yarn resolutions per that reply fixed it.