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

allow better typechecks by setting a max-recursion depth #13052

Closed
zpdDG4gta8XKpMCd opened this issue Dec 20, 2016 · 1 comment
Closed

allow better typechecks by setting a max-recursion depth #13052

zpdDG4gta8XKpMCd opened this issue Dec 20, 2016 · 1 comment
Labels
Declined The issue was declined as something which matches the TypeScript vision Suggestion An idea for TypeScript

Comments

@zpdDG4gta8XKpMCd
Copy link

zpdDG4gta8XKpMCd commented Dec 20, 2016

it's been said many times that certain features cannot be implemented properly due to hitting infinite recursion, and because of that all sort of shortcuts been taken to keep performance acceptable

consider adding a max-depth parameter to the compilerOptions which controls how deep the type checker can go

for developers who don't care about thorough type checks the depth can be 0
others can set it to any comfortable number which gives acceptable results in acceptable time

@zpdDG4gta8XKpMCd zpdDG4gta8XKpMCd changed the title allow better typechecks by allowing to set the max-recursion depth allow better typechecks by customizable the max-recursion depth Dec 20, 2016
@zpdDG4gta8XKpMCd zpdDG4gta8XKpMCd changed the title allow better typechecks by customizable the max-recursion depth allow better typechecks by setting a max-recursion depth Dec 20, 2016
@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label May 24, 2017
@RyanCavanaugh RyanCavanaugh added Declined The issue was declined as something which matches the TypeScript vision Suggestion An idea for TypeScript and removed Needs Investigation This issue needs a team member to investigate its status. labels Sep 18, 2019
@RyanCavanaugh
Copy link
Member

Very few people could use this flag usefully and many more people would set it to nonsense values and feel that the results were unexpected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Declined The issue was declined as something which matches the TypeScript vision Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants