(symbol, typeArguments, aliasSymbol, aliasTypeArguments)
| 60298 | return checkNoTypeArguments(node, symbol) ? type : errorType; |
| 60299 | } |
| 60300 | function getTypeAliasInstantiation(symbol, typeArguments, aliasSymbol, aliasTypeArguments) { |
| 60301 | var type = getDeclaredTypeOfSymbol(symbol); |
| 60302 | if (type === intrinsicMarkerType && intrinsicTypeKinds.has(symbol.escapedName) && typeArguments && typeArguments.length === 1) { |
| 60303 | return getStringMappingType(symbol, typeArguments[0]); |
| 60304 | } |
| 60305 | var links = getSymbolLinks(symbol); |
| 60306 | var typeParameters = links.typeParameters; |
| 60307 | var id = getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments); |
| 60308 | var instantiation = links.instantiations.get(id); |
| 60309 | if (!instantiation) { |
| 60310 | links.instantiations.set(id, instantiation = instantiateTypeWithAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters), ts.isInJSFile(symbol.valueDeclaration))), aliasSymbol, aliasTypeArguments)); |
| 60311 | } |
| 60312 | return instantiation; |
| 60313 | } |
| 60314 | /** |
| 60315 | * Get type from reference to type alias. When a type alias is generic, the declared type of the type alias may include |
| 60316 | * references to the type parameters of the alias. We replace those with the actual type arguments by instantiating the |
no test coverage detected
searching dependent graphs…