Skip to content

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

Merged
2 commits merged into
masterfrom
isolated-declaration-files
Jun 9, 2017
Merged

--isolatedModules: Still allow re-export of type in a declaration file#16399
2 commits merged into
masterfrom
isolated-declaration-files

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jun 9, 2017

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.

Copy link
Copy Markdown
Contributor

@mhegazy mhegazy left a comment

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