Skip to content

Inconsistent errors for non-module entities #12768

Open

Description

TypeScript Version: nightly (2.2.0-dev.20161208)

Code

// @Filename: /node_modules/f/index.d.ts
declare const s: Static;
export = s;

interface Static {
    f(): void;
}

// @Filename: /node_modules/lib1/index.d.ts
import { f } from "f";
declare const _f: typeof f;
export = _f;

// @Filename: /node_modules/lib2/index.d.ts
import { f } from "f";
export = f;

// @Filename: /a.ts
import * as lib1 from "lib1";
import * as lib2 from "lib2";
lib1(); lib2();

Expected behavior:

Both imports are errors.

Actual behavior:

Only the second import is an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions