question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New error: Type instantiation is excessively deep and possibly infinite.

See original GitHub issue

This one’s actually new in 3.8. There are some additional errors in 3.9 - I’ll post them below.

https://github.com/davidkpiano/xstate/blob/2e0bd5dcb11c8ffc5bfc9fba1d3c66fb7546c4bd/packages/core/src/stateUtils.ts#L157

packages/core/src/stateUtils.ts:157:36 - error TS2589: Type instantiation is excessively deep and possibly infinite.

157   return getValueFromAdj(rootNode, getAdjList(config));
                                       ~~~~~~~~~~~~~~~~~~

packages/core/src/State.ts:181:12 - error TS2589: Type instantiation is excessively deep and possibly infinite.

181     return new State(config);
               ~~~~~~~~~~~~~~~~~

packages/core/src/interpreter.ts:208:5 - error TS2589: Type instantiation is excessively deep and possibly infinite.

208     this.parent = parent;
        ~~~~~~~~~~~~~~~~~~~~

packages/core/src/interpreter.ts:783:13 - error TS2345: Argument of type '{ type: string; data: any; }' is not assignable to parameter of type 'string | EventObject | Event<EventObject>[] | Event<EventObject>'.
  Object literal may only specify known properties, and 'data' does not exist in type 'EventObject'.

783             data: err
                ~~~~~~~~~

To repro:

  1. yarn
  2. tsc -b -f tsconfig.monorepo.json

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ahejlsbergcommented, Mar 31, 2020

Glad to see it’s fixed - was that specific issue tracked?

Yes, it was fixed by #36696.

1reaction
DanielRosenwassercommented, Mar 27, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug]: Type error: Type instantiation is excessively deep and ...
Typescript complains that resolving the return type takes too many steps: Type error: Type instantiation is excessively deep and possibly ...
Read more >
Why am I getting "Type instantiation is excessively deep and ...
You'll notice in the Playground link that action has the error: "Type instantiation is excessively deep and possibly infinite".
Read more >
TypeScript. Type instantiation is excessively deep ... - Ilya Zykin
Makes reading the code very difficult. The problem hides in StyledComponents file. We need to describe a type of a styled component like...
Read more >
Type instantiation is excessively deep and possibly infinite ...
Getting `Type instantiation is excessively deep and possibly infinite` errors whenever I pass MongoClient as a parameter in my code after ...
Read more >
HtmlEditor - The `Type instantiation is excessively deep and ...
HtmlEditor - The `Type instantiation is excessively deep and possibly infinite` error occurs when TypeScript and jQuery are used in an ASP.NET ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found