mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 22:18:04 -05:00
Merge pull request #6044 from weswigham/redeclared-export-type
Exempt one type declaration from the redeclared export check - Fix #6043
This commit is contained in:
@@ -14295,7 +14295,7 @@ namespace ts {
|
||||
}
|
||||
const { declarations, flags } = exports[id];
|
||||
// ECMA262: 15.2.1.1 It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries. (TS Exceptions: namespaces, function overloads, enums, and interfaces)
|
||||
if (!(flags & (SymbolFlags.Namespace | SymbolFlags.Interface | SymbolFlags.Enum)) && declarations.length > 1) {
|
||||
if (!(flags & (SymbolFlags.Namespace | SymbolFlags.Interface | SymbolFlags.Enum)) && (flags & SymbolFlags.TypeAlias ? declarations.length - 1 : declarations.length) > 1) {
|
||||
const exportedDeclarations: Declaration[] = filter(declarations, isNotOverload);
|
||||
if (exportedDeclarations.length > 1) {
|
||||
for (const declaration of exportedDeclarations) {
|
||||
|
||||
Reference in New Issue
Block a user