fix(53735): Definition file generated from javascript is missing getter (#53768)

This commit is contained in:
Oleksandr T
2023-04-26 00:42:15 +03:00
committed by GitHub
parent 6c3239ce74
commit 546be4b360
5 changed files with 155 additions and 1 deletions

View File

@@ -8684,7 +8684,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
// Need to skip over export= symbols below - json source files get a single `Property` flagged
// symbol of name `export=` which needs to be handled like an alias. It's not great, but it is what it is.
if (symbol.flags & (SymbolFlags.BlockScopedVariable | SymbolFlags.FunctionScopedVariable | SymbolFlags.Property)
if (symbol.flags & (SymbolFlags.BlockScopedVariable | SymbolFlags.FunctionScopedVariable | SymbolFlags.Property | SymbolFlags.Accessor)
&& symbol.escapedName !== InternalSymbolName.ExportEquals
&& !(symbol.flags & SymbolFlags.Prototype)
&& !(symbol.flags & SymbolFlags.Class)