Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

tsconfig.json should default maxNodeModuleJsDepth to 1 #17183

Copy link
Copy link
@the-reality-engineer

Description

@the-reality-engineer
Issue body actions

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?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.