(node)
| 77167 | return globalESSymbol === resolveName(left, "Symbol", 111551 /* SymbolFlags.Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); |
| 77168 | } |
| 77169 | function checkImportCallExpression(node) { |
| 77170 | // Check grammar of dynamic import |
| 77171 | checkGrammarImportCallExpression(node); |
| 77172 | if (node.arguments.length === 0) { |
| 77173 | return createPromiseReturnType(node, anyType); |
| 77174 | } |
| 77175 | var specifier = node.arguments[0]; |
| 77176 | var specifierType = checkExpressionCached(specifier); |
| 77177 | var optionsType = node.arguments.length > 1 ? checkExpressionCached(node.arguments[1]) : undefined; |
| 77178 | // Even though multiple arguments is grammatically incorrect, type-check extra arguments for completion |
| 77179 | for (var i = 2; i < node.arguments.length; ++i) { |
| 77180 | checkExpressionCached(node.arguments[i]); |
| 77181 | } |
| 77182 | if (specifierType.flags & 32768 /* TypeFlags.Undefined */ || specifierType.flags & 65536 /* TypeFlags.Null */ || !isTypeAssignableTo(specifierType, stringType)) { |
| 77183 | error(specifier, ts.Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType)); |
| 77184 | } |
| 77185 | if (optionsType) { |
| 77186 | var importCallOptionsType = getGlobalImportCallOptionsType(/*reportErrors*/ true); |
| 77187 | if (importCallOptionsType !== emptyObjectType) { |
| 77188 | checkTypeAssignableTo(optionsType, getNullableType(importCallOptionsType, 32768 /* TypeFlags.Undefined */), node.arguments[1]); |
| 77189 | } |
| 77190 | } |
| 77191 | // resolveExternalModuleName will return undefined if the moduleReferenceExpression is not a string literal |
| 77192 | var moduleSymbol = resolveExternalModuleName(node, specifier); |
| 77193 | if (moduleSymbol) { |
| 77194 | var esModuleSymbol = resolveESModuleSymbol(moduleSymbol, specifier, /*dontRecursivelyResolve*/ true, /*suppressUsageError*/ false); |
| 77195 | if (esModuleSymbol) { |
| 77196 | return createPromiseReturnType(node, getTypeWithSyntheticDefaultOnly(getTypeOfSymbol(esModuleSymbol), esModuleSymbol, moduleSymbol, specifier) || |
| 77197 | getTypeWithSyntheticDefaultImportType(getTypeOfSymbol(esModuleSymbol), esModuleSymbol, moduleSymbol, specifier)); |
| 77198 | } |
| 77199 | } |
| 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 */); |
no test coverage detected
searching dependent graphs…