(type, symbol, originalSymbol, moduleSpecifier)
| 77221 | return undefined; |
| 77222 | } |
| 77223 | function getTypeWithSyntheticDefaultImportType(type, symbol, originalSymbol, moduleSpecifier) { |
| 77224 | var _a; |
| 77225 | if (allowSyntheticDefaultImports && type && !isErrorType(type)) { |
| 77226 | var synthType = type; |
| 77227 | if (!synthType.syntheticType) { |
| 77228 | var file = (_a = originalSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isSourceFile); |
| 77229 | var hasSyntheticDefault = canHaveSyntheticDefault(file, originalSymbol, /*dontResolveAlias*/ false, moduleSpecifier); |
| 77230 | if (hasSyntheticDefault) { |
| 77231 | var anonymousSymbol = createSymbol(2048 /* SymbolFlags.TypeLiteral */, "__type" /* InternalSymbolName.Type */); |
| 77232 | var defaultContainingObject = createDefaultPropertyWrapperForModule(symbol, originalSymbol, anonymousSymbol); |
| 77233 | anonymousSymbol.type = defaultContainingObject; |
| 77234 | synthType.syntheticType = isValidSpreadType(type) ? getSpreadType(type, defaultContainingObject, anonymousSymbol, /*objectFlags*/ 0, /*readonly*/ false) : defaultContainingObject; |
| 77235 | } |
| 77236 | else { |
| 77237 | synthType.syntheticType = type; |
| 77238 | } |
| 77239 | } |
| 77240 | return synthType.syntheticType; |
| 77241 | } |
| 77242 | return type; |
| 77243 | } |
| 77244 | function isCommonJsRequire(node) { |
| 77245 | if (!ts.isRequireCall(node, /*checkArgumentIsStringLiteralLike*/ true)) { |
| 77246 | return false; |
no test coverage detected
searching dependent graphs…