CASL fails to compile with Typescript 4.3.X
See original GitHub issueDescribe the bug CASL is not compatible with Typescript 4.3.x and fails compilation
To Reproduce Steps to reproduce the behavior:
- Install
@casl/ability
v5.3.1 andtypescript
v4.3.x tsc ./
Expected behavior CASL should not fail compilation when using Typescript 4.3.x
Current behavior Typescript outputs the following:
node_modules/@casl/ability/dist/types/matchers/conditions.d.ts:26:5 - error TS2502: 'produce' is referenced directly or indirectly in its own type annotation.
26 produce: MongoQuery<this[0]>;
Related file: https://github.com/stalniy/casl/blob/master/packages/casl-ability/src/matchers/conditions.ts#L71
CASL Version
@casl/ability
v5.3.1
Environment: Node v14.16.1 Typescript 4.3.4 @casl/ability 5.3.1
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Failed to compile main process with typescript 4.3 and class ...
Describe the bug After upgrading TypeScript to 4.3.x main process bundle no longer builds if there's a class with private field.
Read more >Error: TSError: Unable to compile TypeScript - Stack Overflow
I had met same issue. First I remove ts-node and typescript from package.json . then, npm install ts-node --save-dev npm install typescript ......
Read more >Documentation - TypeScript 4.3
That's why TypeScript 4.3 allows you to specify types for reading and writing to properties. let num = Number ( value ); //...
Read more >TypeScript Compiling with Visual Studio Code
It offers classes, modules, and interfaces to help you build robust components. Install the TypeScript compiler. Visual Studio Code includes TypeScript language ...
Read more >Compile and build TypeScript code using NuGet
Learn how to add TypeScript support to your Visual Studio projects by using the NuGet package.
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
Thanks for the issue. Need some time to investigate it. Will do this in couple days
Could you please make a simple repo with basic example that doesn’t work? As I said, in my primitive testing it works, maybe it’s an integration issue with sequelize and TypeORM