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

tsc with --allowJS ignores modules in node_modules #17182

Copy link
Copy link
@the-reality-engineer

Description

@the-reality-engineer
Issue body actions

TypeScript Version: 2.4.1

Code

// A *self-contained* demonstration of the problem follows...
import module = require('module-in-node_modules-with-jsdoc-annotations');

Compiling with commonjs module resolution, and the --allowJS and --checkJS compiler options.

Expected behavior:

  1. Typescript should be able to "find" any modules that are installed (e.g. in "node_modules"), even if it doesn't have type definitions for them.
  2. Typescript should be able to rely on jsdoc annotations within those modules for type checking and language services.

Actual behavior:

[ts] Cannot find module 'module-in-node_modules-with-jsdoc-annotations'.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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.