flag to customize type instantiation depth limit #46180
Labels
Declined
The issue was declined as something which matches the TypeScript vision
Suggestion
An idea for TypeScript
Suggestion
π Search Terms
customize type instantiation depth limit
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
it seems that the type instantiation depth limit changes quite often (most recently in #45711). i think it would be useful to be able to customize this behavior in compiler flags such as
typeInstantiationDepthLimit
andtailRecursionTypeInstantiationDepthLimit
though i'm not sure how this would work if a project depends on a project that customizes these...
π» Use Cases
i have a repository of utility types, many of which use recursive conditional types and rely on the depth limit being quite high. a workaround for the depth limit i've been using is this logarithmic approach, but with the new tail recursion change i've been thinking of replacing it with a much simpler implementation, though that would change the limit from 10000 to 1000.
The text was updated successfully, but these errors were encountered: