mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 15:45:27 -05:00
--isolatedModules: Still allow re-export of type in a declaration file (#16399)
* --isolatedModules: Still allow re-export of type in a declaration file * Use isInAmbientContext
This commit is contained in:
@@ -21789,7 +21789,10 @@ namespace ts {
|
||||
}
|
||||
|
||||
// Don't allow to re-export something with no value side when `--isolatedModules` is set.
|
||||
if (node.kind === SyntaxKind.ExportSpecifier && compilerOptions.isolatedModules && !(target.flags & SymbolFlags.Value)) {
|
||||
if (compilerOptions.isolatedModules
|
||||
&& node.kind === SyntaxKind.ExportSpecifier
|
||||
&& !(target.flags & SymbolFlags.Value)
|
||||
&& !isInAmbientContext(node)) {
|
||||
error(node, Diagnostics.Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user