-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@types/jest v28 introduces circularly reference #3619
Comments
Looks like related to #3609 |
Yeah - we are in this situation largely because we're still on TypeScript 3.9, and most of the ecosystem around us is gradually adopting TypeScript 4.3 to 4.5 minimum targets (for obvious reasons). There is also aws/aws-cdk-rfcs#373 where I propose to have In the meantime - the next release of |
Would setting skipLibCheck to true prevent jsii from looking in node_modules to begin with? |
I'm not sure... it could have other consequences on the TypeChecker AST we obtain during parsing, so I'm reluctant to resort to this... |
Fixed by supporting modern TS versions. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
When using dependency "@types/jest": "28.1.3" a circular reference error is thrown:
:space_invader: build » compile | jsii --silence-warnings=reserved-word [2022-06-26T08:37:09.762] [ERROR] jsii/compiler - Compilation errors prevented the JSII assembly from being created node_modules/@sinclair/typebox/typebox.d.ts:237:21 - error TS2456: Type alias 'StaticIntersectReduce' circularly references itself. 237 export declare type StaticIntersectReduce<I extends unknown, T extends readonly any[]> = T extends [infer A, ...infer B] ? StaticIntersectReduce<I & A, B> : I;
using
yarn why @sinclair/typebox
revealed that @sinclair/typebox is used by @types/jest .Expected Behavior
no circular reference error thrown
Current Behavior
circular reference error thrown
Reproduction Steps
Possible Solution
Fix version to 27.4.1 fixed the issue for me
Additional Information/Context
No response
SDK version used
1.61.0
Environment details (OS name and version, etc.)
MacOS
The text was updated successfully, but these errors were encountered: