@@ -1020,7 +1020,7 @@ namespace ts {
1020
1020
1021
1021
// It's an external module. First see if the module has an export default and if the local
1022
1022
// name of that export default matches.
1023
- if (result = moduleExports.get("default" as __String )) {
1023
+ if (result = moduleExports.get(InternalSymbolName.Default )) {
1024
1024
const localSymbol = getLocalSymbolForExportDefault(result);
1025
1025
if (localSymbol && (result.flags & meaning) && localSymbol.escapedName === name) {
1026
1026
break loop;
@@ -1474,8 +1474,8 @@ namespace ts {
1474
1474
else {
1475
1475
const exportValue = moduleSymbol.exports.get("export=" as __String);
1476
1476
exportDefaultSymbol = exportValue
1477
- ? getPropertyOfType(getTypeOfSymbol(exportValue), "default" as __String )
1478
- : resolveSymbol(moduleSymbol.exports.get("default" as __String ), dontResolveAlias);
1477
+ ? getPropertyOfType(getTypeOfSymbol(exportValue), InternalSymbolName.Default )
1478
+ : resolveSymbol(moduleSymbol.exports.get(InternalSymbolName.Default ), dontResolveAlias);
1479
1479
}
1480
1480
1481
1481
if (!exportDefaultSymbol && !allowSyntheticDefaultImports) {
@@ -1564,7 +1564,7 @@ namespace ts {
1564
1564
symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias);
1565
1565
let symbolFromModule = getExportOfModule(targetSymbol, name.escapedText, dontResolveAlias);
1566
1566
// If the export member we're looking for is default, and there is no real default but allowSyntheticDefaultImports is on, return the entire module as the default
1567
- if (!symbolFromModule && allowSyntheticDefaultImports && name.escapedText === "default" ) {
1567
+ if (!symbolFromModule && allowSyntheticDefaultImports && name.escapedText === InternalSymbolName.Default ) {
1568
1568
symbolFromModule = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
1569
1569
}
1570
1570
const symbol = symbolFromModule && symbolFromVariable ?
@@ -1951,7 +1951,7 @@ namespace ts {
1951
1951
function extendExportSymbols(target: SymbolTable, source: SymbolTable | undefined, lookupTable?: ExportCollisionTrackerTable, exportNode?: ExportDeclaration) {
1952
1952
if (!source) return;
1953
1953
source.forEach((sourceSymbol, id) => {
1954
- if (id === "default" ) return;
1954
+ if (id === InternalSymbolName.Default ) return;
1955
1955
1956
1956
const targetSymbol = target.get(id);
1957
1957
if (!targetSymbol) {
@@ -3221,7 +3221,7 @@ namespace ts {
3221
3221
* ensuring that any names written with literals use element accesses.
3222
3222
*/
3223
3223
function appendPropertyOrElementAccessForSymbol(symbol: Symbol, writer: SymbolWriter): void {
3224
- const symbolName = symbol.escapedName === "default" ? "default" : getNameOfSymbolAsWritten(symbol);
3224
+ const symbolName = symbol.escapedName === InternalSymbolName.Default ? InternalSymbolName.Default : getNameOfSymbolAsWritten(symbol);
3225
3225
const firstChar = symbolName.charCodeAt(0);
3226
3226
const needsElementAccess = !isIdentifierStart(firstChar, languageVersion);
3227
3227
0 commit comments