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

--isolatedModules: Still allow re-export of type in a declaration file#16399

Merged
2 commits merged into
mastermicrosoft/TypeScript:masterfrom
isolated-declaration-filesmicrosoft/TypeScript:isolated-declaration-filesCopy head branch name to clipboard
Jun 9, 2017
Merged

--isolatedModules: Still allow re-export of type in a declaration file#16399
2 commits merged into
mastermicrosoft/TypeScript:masterfrom
isolated-declaration-filesmicrosoft/TypeScript:isolated-declaration-filesCopy head branch name to clipboard

Conversation

@ghost

@ghost ghost commented Jun 9, 2017

Copy link
Copy Markdown

Fixes #16351
Was broken by #15538

Comment thread src/compiler/checker.ts Outdated
// Module augmentation / ambient declaration not allowed under `--isolatedModules` anyway, so this should be at the top-level.
&& isSourceFile(node.parent.parent.parent)
// OK to re-export a type in a declaration file.
&& !node.parent.parent.parent.isDeclarationFile) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use isInAmbientContext instead.

@mhegazy mhegazy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use isInAmbientModule

@ghost ghost merged commit a2d5242 into master Jun 9, 2017
@ghost ghost deleted the isolated-declaration-files branch June 9, 2017 16:39
@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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.