mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 22:32:33 -05:00
Fix export of enum with same-named member (#55070)
This commit is contained in:
@@ -3040,8 +3040,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
// (it refers to the constant type of the expression instead)
|
||||
return undefined;
|
||||
}
|
||||
if (isModuleDeclaration(location) && lastLocation && location.name === lastLocation) {
|
||||
// If this is the name of a namespace, skip the parent since it will have is own locals that could
|
||||
if (isModuleOrEnumDeclaration(location) && lastLocation && location.name === lastLocation) {
|
||||
// If lastLocation is the name of a namespace or enum, skip the parent since it will have is own locals that could
|
||||
// conflict.
|
||||
lastLocation = location;
|
||||
location = location.parent;
|
||||
|
||||
Reference in New Issue
Block a user