mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-06 15:03:14 -05:00
Merge pull request #15538 from Microsoft/isolated-modules_re-export-type
Don't allow to re-export a type when '--isolatedModules' is set
This commit is contained in:
@@ -21445,6 +21445,11 @@ namespace ts {
|
||||
Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
|
||||
error(node, message, symbolToString(symbol));
|
||||
}
|
||||
|
||||
// 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)) {
|
||||
error(node, Diagnostics.Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -635,6 +635,10 @@
|
||||
"category": "Error",
|
||||
"code": 1203
|
||||
},
|
||||
"Cannot re-export a type when the '--isolatedModules' flag is provided.": {
|
||||
"category": "Error",
|
||||
"code": 1205
|
||||
},
|
||||
"Decorators are not valid here.": {
|
||||
"category": "Error",
|
||||
"code": 1206
|
||||
|
||||
Reference in New Issue
Block a user