MCPcopy Index your code
hub / github.com/nodejs/node / createDefaultPropertyWrapperForModule

Function createDefaultPropertyWrapperForModule

test/fixtures/snapshot/typescript.js:77202–77210  ·  view source on GitHub ↗
(symbol, originalSymbol, anonymousSymbol)

Source from the content-addressed store, hash-verified

77200 return createPromiseReturnType(node, anyType);
77201 }
77202 function createDefaultPropertyWrapperForModule(symbol, originalSymbol, anonymousSymbol) {
77203 var memberTable = ts.createSymbolTable();
77204 var newSymbol = createSymbol(2097152 /* SymbolFlags.Alias */, "default" /* InternalSymbolName.Default */);
77205 newSymbol.parent = originalSymbol;
77206 newSymbol.nameType = getStringLiteralType("default");
77207 newSymbol.aliasTarget = resolveSymbol(symbol);
77208 memberTable.set("default" /* InternalSymbolName.Default */, newSymbol);
77209 return createAnonymousType(anonymousSymbol, memberTable, ts.emptyArray, ts.emptyArray, ts.emptyArray);
77210 }
77211 function getTypeWithSyntheticDefaultOnly(type, symbol, originalSymbol, moduleSpecifier) {
77212 var hasDefaultOnly = isOnlyImportedAsDefault(moduleSpecifier);
77213 if (hasDefaultOnly && type && !isErrorType(type)) {

Calls 5

createSymbolFunction · 0.85
getStringLiteralTypeFunction · 0.85
resolveSymbolFunction · 0.85
createAnonymousTypeFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected