Skip to content

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

Closed
@zpdDG4gta8XKpMCd

Description

@zpdDG4gta8XKpMCd

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

Activity

changed the title [-]allow better typechecks by allowing to set the max-recursion depth[/-] [+]allow better typechecks by customizable the max-recursion depth[/+] on Dec 20, 2016
changed the title [-]allow better typechecks by customizable the max-recursion depth[/-] [+]allow better typechecks by setting a max-recursion depth[/+] on Dec 20, 2016
added
DeclinedThe issue was declined as something which matches the TypeScript vision
SuggestionAn idea for TypeScript
and removed
Needs InvestigationThis issue needs a team member to investigate its status.
on Sep 18, 2019
RyanCavanaugh

RyanCavanaugh commented on Sep 18, 2019

@RyanCavanaugh
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeclinedThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @zpdDG4gta8XKpMCd@RyanCavanaugh

        Issue actions

          allow better typechecks by setting a max-recursion depth · Issue #13052 · microsoft/TypeScript