Skip to content

Exported variable 'X' has or is using name 'Y' from external module "Z" but cannot be named. #20842

@alan-agius4

Description

@alan-agius4

TypeScript Version: 2.7.0-dev.20171221

Code

// foo.ts
import { WatchOptions } from "cpx";
export let x: WatchOptions;

// bar.ts
import { x } from "./foo";
export const x2 = x;

Just for the sake of the above you can install only @types/cpx

Expected behavior:
No error and the external module interface is named.

Actual behavior:

Exported variable 'x2' has or is using name 'WatchOptions' from external module "C:/git/xxxx/node_modules/@types/cpx/index" but cannot be named.

Related to #20657 but it seems this only solved local non node_modules imports

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions