Skip to content

Allow to narrow the type of an import - #16658

Merged
2 commits merged into
masterfrom
narrowedImports
Jul 10, 2017
Merged

2 commits merged into
masterfrom
narrowedImports

Conversation

@ghost

Copy link
Copy Markdown

Fixes #16408 and #12081

@ghost

Copy link
Copy Markdown
Author

Whoops, this creates a new bug:

// @strictNullChecks: true

// @Filename: /a.d.ts
declare namespace a {
    export const version: string;
}
export = a;

// @Filename: /b.ts
import a = require("./a");
a.version; // Variable 'a' is used before being assigned.

@ghost
ghost merged commit 12163cc into master Jul 10, 2017
@ghost
ghost deleted the narrowedImports branch July 10, 2017 16:18
@ghost ghost mentioned this pull request Jul 10, 2017
Marin Marinov (gcnew) added a commit to gcnew/TypeScript that referenced this pull request Jul 10, 2017
@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jun 14, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants