microsoft / microsoft/TypeScript
New error: Type instantiation is excessively deep and possibly infinite.
Open
Nobody has claimed this yet.
Needs Investigation
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
This one's actually new in 3.8. There are some additional errors in 3.9 - I'll post them below.
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:
yarntsc -b -f tsconfig.monorepo.json
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run yarn and tsc -b -f tsconfig.monorepo.json in the linked xstate revision. Start by reading packages/core/src/stateUtils.ts:157, packages/core/src/State.ts:181, and packages/core/src/interpreter.ts:208 and 783. Done means the reported TS2589 and TS2345 errors no longer appear in the reproduction build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100