Excessive stack depth comparing types with TS 3.2
See original GitHub issueTypeScript Version: 3.2.2
Search Terms: error TS2321: Excessive stack depth comparing types lodash
Code
import { PartialDeep, pick } from 'lodash';
type MapFunc<T> = (data: PartialDeep<T>) => PartialDeep<T>;
function testFunc<T>(): MapFunc<T> {
return data => pick<PartialDeep<T>>(data, []) as PartialDeep<T>;
}
{
"compilerOptions": {
"target": "es2018",
"module": "commonjs",
"lib": ["es2018", "dom"],
"strict": true,
"noEmitOnError": true
}
}
Expected behavior: This code should compile with TS 3.2 as it will with TS 3.1
Actual behavior: Compliation fails with the following error
error TS2321: Excessive stack depth comparing types 'PartialDeep<T>' and 'PartialDeep<PartialDeep<T>>'.
Found 2 errors.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:33
- Comments:25
Top Results From Across the Web
Typescript 4.5 excessive stack depth comparing types
I want to understand the use case because a recent feature request to turn string literals to numeric literals was declined, and this...
Read more >type-graphql/Lobby - Gitter
Well, for a projection I have to use MongoRepository, and this is blocked by the [at-loader] TS2321: Excessive stack depth comparing types ...
Read more >Eliminating Stack Overflow by Abstract Interpretation
An important correctness criterion for software running on embedded microcontrollers is stack safety: a guarantee that the call stack does not overflow.
Read more >CUDA C++ Programming Guide - NVIDIA Documentation Center
To avoid allocating too much memory and thus impacting system-wide performance, request the allocation parameters from the user based on the problem size....
Read more >Three-dimensional pre-stack depth migration of receiver ...
We present a novel 3-D pre-stack Kirchhoff depth migration (PKDM) method for ... Comparison with the widely used common conversion point (CCP) stacking ......
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
Same issue here with TypeORM. 😦
error TS2321: Excessive stack depth comparing types ‘any’ and ‘FindConditions<E>’.
Chiming in with the same error for new version of typeorm.
Node: v12.6.0 typeorm: v0.2.18 typescript: v3.6.2
Downgrading typescript v.3.5.3 And then using @babel/plugin-proposal-decorators for my needed 3.6 feature has worked for now.