Skip to content
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

[atom] TS4.3 compile error "type instantiation excessively deep and possibly infinite" #294

Closed
postspectacular opened this issue Jun 7, 2021 · 0 comments

Comments

@postspectacular
Copy link
Member

postspectacular commented Jun 7, 2021

Due to some regression in the TS compiler, @thi.ng/atom (and maybe other packages too) won't compile anymore w/ TS 4.3.2 and is throwing this dreaded error now:

src/atom.ts(32,14): error TS2589: Type instantiation is excessively deep and possibly infinite.
src/cursor.ts(114,14): error TS2589: Type instantiation is excessively deep and possibly infinite.
src/history.ts(44,14): error TS2589: Type instantiation is excessively deep and possibly infinite.
src/transacted.ts(39,14): error TS2589: Type instantiation is excessively deep and possibly infinite.

It's v. likely the culprit is not in that package itself, but caused by the recursive PathVal typedef (and related others) in @thi.ng/api. Likely, but not confirmed! OTOH the @thi.ng/paths package too makes use of those type aliases and does compile...

If I'm not mistaken, some of these recursive helper types used could likely be simplified, now that variadic tuple types are available since TS4.0... let's enquire more and maybe start there...

Relevant TS issues:

postspectacular added a commit that referenced this issue Jun 7, 2021
- simplify Head, Tail, Prepend type defs
- update ArrayValue, Reverse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant