You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a known issue in TypeScript involving eager evaluation of recursive types in certain situations. We ran into this in our tests using PartialDeep on an element that included elemRef: Element in its props when we upgraded to TS 4.4; there must be a new recursive type definition somewhere in lib.dom now. The issue includes a suggested solution.
This TS playground illustrates both the problem and suggested fix for PartialDeep directly as well as the simpler PartialRecursive type from the TS issue.
The text was updated successfully, but these errors were encountered:
merrywhether
changed the title
PartialDeep & error TS2589: Type instantiation is excessively deep and possibly infinite PartialDeep & error TS2589: Type instantiation is excessively deep and possibly infinite Oct 16, 2021
merrywhether
changed the title
PartialDeep & error TS2589: Type instantiation is excessively deep and possibly infinite PartialDeep & error TS2589: Type instantiation is excessively deep and possibly infiniteOct 17, 2021
There is a known issue in TypeScript involving eager evaluation of recursive types in certain situations. We ran into this in our tests using
PartialDeep
on an element that includedelemRef: Element
in its props when we upgraded to TS 4.4; there must be a new recursive type definition somewhere inlib.dom
now. The issue includes a suggested solution.This TS playground illustrates both the problem and suggested fix for
PartialDeep
directly as well as the simplerPartialRecursive
type from the TS issue.The text was updated successfully, but these errors were encountered: