Skip to content

tsconfig.json should default maxNodeModuleJsDepth to 1 #17183

Closed
@speigg

Description

@speigg

TypeScript Version: 2.4.1

Expected behavior:

Basically, I expected --allowJS to know about modules in node_modules that don't have typescript definitions, the same way that a jsConfig.json project does.

Actual behavior:

Typescript doesn't know about modules in node_modules until the maxNodeModuleJsDepth compiler option is set to 1 or greater. It seems that it used to default to 2, but this was changed to 0 in #10538 (for performance reasons I think?). Given that jsConfig.json defaults this value to 2, can tsConfig.json at least default to 1 so that the --allowJS option works with top-level node modules out of the box?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions