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

Test harness doesn't correctly exclude d.ts from an included tsconfig #10539

Copy link
Copy link
@sandersn

Description

@sandersn
Issue body actions

Code

// @module: commonjs
// @moduleResolution: node
// @allowJs: true
// @noEmit: true
// @traceResolution: true

// @filename: c:/root/tsconfig.json
{
    "compileOnSave": true,
    "compilerOptions": {
        "module": "commonjs",
        "moduleResolution": "node",
        "outDir": "bin"
    },
    "exclude": [ "bah" ]
}

// @filename: c:/root/node_modules/shortid/index.js
module.exports = { fromNodeModules: 'foo' };

// @filename: c:/root/bah/index.d.ts
declare module "shortid" {
    export var fromTypings: number;
}

// @filename: c:/root/index.ts
// no triple-slash reference means that index.d.ts is not used
import * as foo from "shortid";
foo.fromTypings     // ignored
foo.fromNodeModules // found

Expected behavior:

Error at foo.fromTypings

Actual behavior:

Error at foo.fromNodeModules

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    InfrastructureIssue relates to TypeScript team infrastructureIssue relates to TypeScript team infrastructure

    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.