Home
last modified time | relevance | path

Searched refs:typeChecker (Results 1 – 25 of 31) sorted by relevance

12

/third_party/typescript/src/services/
DgoToDefinition.ts17 const typeChecker = program.getTypeChecker(); constant
20 return getDefinitionFromOverriddenMember(typeChecker, node) || emptyArray;
26 …return label ? [createDefinitionInfoFromName(typeChecker, label, ScriptElementKind.label, node.tex…
32 …return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclar…
37 … const { symbol, failedAliasResolution } = getSymbol(classDecl, typeChecker, stopAtAlias);
40 const containerName = symbol ? typeChecker.symbolToString(symbol, classDecl) : ""; constant
45 …return createDefinitionInfoFromName(typeChecker, staticBlock, ScriptElementKind.constructorImpleme…
49 let { symbol, failedAliasResolution } = getSymbol(node, typeChecker, stopAtAlias);
57 … ({ symbol, failedAliasResolution } = getSymbol(moduleSpecifier, typeChecker, stopAtAlias));
84 …eturn concatenate(fileReferenceDefinition, getDefinitionInfoForIndexSignatures(node, typeChecker));
[all …]
DsymbolDisplay.ts6 …export function getSymbolKind(typeChecker: TypeChecker, symbol: Symbol, location: Node): ScriptEle…
7 …const result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, …
28 …function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker: TypeChecker, s…
29 const roots = typeChecker.getRootSymbols(symbol);
34 …&& typeChecker.getTypeOfSymbolAtLocation(symbol, location).getNonNullableType().getCallSignatures(…
38 if (typeChecker.isUndefinedSymbol(symbol)) {
41 if (typeChecker.isArgumentsSymbol(symbol)) {
72 … const unionPropertyKind = forEach(typeChecker.getRootSymbols(symbol), rootSymbol => {
81 … const typeOfUnionProperty = typeChecker.getTypeOfSymbolAtLocation(symbol, location);
111 export function getSymbolModifiers(typeChecker: TypeChecker, symbol: Symbol): string {
[all …]
DcallHierarchy.ts93 …function getSymbolOfCallHierarchyDeclaration(typeChecker: TypeChecker, node: Exclude<CallHierarchy…
95 return location && typeChecker.getSymbolAtLocation(location);
115 const typeChecker = program.getTypeChecker(); constant
116 const symbol = typeChecker.getSymbolAtLocation(node.parent);
117 const prefix = symbol ? `${typeChecker.symbolToString(symbol, node.parent)} ` : "";
132 const typeChecker = program.getTypeChecker(); constant
133 const symbol = typeChecker.getSymbolAtLocation(declName);
135 text = typeChecker.symbolToString(symbol, node);
173 …function findImplementation(typeChecker: TypeChecker, node: Extract<CallHierarchyDeclaration, Func…
174 …function findImplementation(typeChecker: TypeChecker, node: FunctionLikeDeclaration): FunctionLike…
[all …]
Drename.ts16 typeChecker: TypeChecker,
20 const symbol = typeChecker.getSymbolAtLocation(node);
23 const type = getContextualTypeFromParentOrAncestorTypeNode(node, typeChecker);
55 …uldRenameNodeModules = wouldRenameInOtherNodeModules(sourceFile, symbol, typeChecker, preferences);
60 const kind = SymbolDisplay.getSymbolKind(typeChecker, symbol, node);
64 const displayName = specifierName || typeChecker.symbolToString(symbol);
65 const fullDisplayName = specifierName || typeChecker.getFullyQualifiedName(symbol);
66 …s(displayName, fullDisplayName, kind, SymbolDisplay.getSymbolModifiers(typeChecker,symbol), node, …
DsignatureHelp.ts24 const typeChecker = program.getTypeChecker(); constant
42 …tInfo = getContainingArgumentInfo(startingToken, position, sourceFile, typeChecker, isManuallyInvo…
48 …const candidateInfo = getCandidateOrTypeInfo(argumentInfo, typeChecker, sourceFile, startingToken,…
57 return typeChecker.runWithCancellationToken(cancellationToken, typeChecker =>
59 …s(candidateInfo.candidates, candidateInfo.resolvedSignature, argumentInfo, sourceFile, typeChecker)
60 : createTypeHelpItems(candidateInfo.symbol, argumentInfo, sourceFile, typeChecker));
124 const typeChecker = program.getTypeChecker(); constant
127 …const type = declaration.symbol && typeChecker.getTypeOfSymbolAtLocation(declaration.symbol, decla…
130 return typeChecker.runWithCancellationToken(
132 typeChecker => createSignatureHelpItems(
[all …]
Dcompletions.ts706 const typeChecker = program.getTypeChecker(); constant
789 const type = typeChecker.getTypeOfSymbolAtLocation(symbol, location);
832 kind: SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
833 kindModifiers: SymbolDisplay.getSymbolModifiers(typeChecker, symbol),
837 …isRecommended: isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker) || undefin…
1420 const typeChecker = program.getTypeChecker(); constant
1436 …const sortText = (isDeprecated(symbol, typeChecker) ? SortText.Deprecated(originalSortText) : orig…
1473 …olKind = SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, source…
1514 const symbolOrigin = skipAlias(symbol, typeChecker);
1534 return symbolCanBeReferencedAtTypeLocation(symbol, typeChecker);
[all …]
Dclassifier2020.ts55 const typeChecker = program.getTypeChecker(); constant
83 let symbol = typeChecker.getSymbolAtLocation(node);
86 symbol = typeChecker.getAliasedSymbol(symbol);
103 typeIdx = reclassifyByType(typeChecker, node, typeIdx);
172 function reclassifyByType(typeChecker: TypeChecker, node: Node, typeIdx: TokenType): TokenType {
175 const type = typeChecker.getTypeAtLocation(node);
DstringCompletions.ts166 …ies(sourceFile: SourceFile, node: StringLiteralLike, position: number, typeChecker: TypeChecker, c…
176 … kind: StringLiteralCompletionKind.Types, types: getStringLiteralTypes(typeChecker.getTypeArgument…
191 … return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType));
193 …ralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) };
199 …const types = getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(grandParent as UnionType…
220 return stringLiteralCompletionsForObjectLiteral(typeChecker, parent.parent);
233 … return stringLiteralCompletionsFromProperties(typeChecker.getTypeAtLocation(expression));
246 …lCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContext…
259 …ralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) };
268 ….Types, types: getStringLiteralTypes(getContextualTypeFromParent(node, typeChecker)), isNewIdentif…
[all …]
DorganizeImports.ts150 const typeChecker = program.getTypeChecker(); constant
152 const jsxNamespace = typeChecker.getJsxNamespace(sourceFile);
153 const jsxFragmentFactory = typeChecker.getJsxFragmentFactory(sourceFile);
219 … FindAllReferences.Core.isSymbolReferencedInFile(identifier, typeChecker, sourceFile);
Dservices.ts1733 const typeChecker = program.getTypeChecker(); constant
1735 const symbol = getSymbolAtLocationForQuickInfo(nodeForQuickInfo, typeChecker);
1737 if (!symbol || typeChecker.isUnknownSymbol(symbol)) {
1738 …const type = shouldGetType(sourceFile, nodeForQuickInfo, position) ? typeChecker.getTypeAtLocation…
1743 …displayParts: typeChecker.runWithCancellationToken(cancellationToken, typeChecker => typeToDisplay…
1744 … documentation: type.symbol ? type.symbol.getDocumentationComment(typeChecker) : undefined,
1745 tags: type.symbol ? type.symbol.getJsDocTags(typeChecker) : undefined
1749 …ind, displayParts, documentation, tags } = typeChecker.runWithCancellationToken(cancellationToken,…
1750 …SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, get…
1754 kindModifiers: SymbolDisplay.getSymbolModifiers(typeChecker, symbol),
Dclassifier.ts457 …export function getSemanticClassifications(typeChecker: TypeChecker, cancellationToken: Cancellati…
458 …return convertClassificationsToSpans(getEncodedSemanticClassifications(typeChecker, cancellationTo…
485 …export function getEncodedSemanticClassifications(typeChecker: TypeChecker, cancellationToken: Can…
498 const symbol = typeChecker.getSymbolAtLocation(node);
499 … const type = symbol && classifySymbol(symbol, getMeaningFromLocation(node), typeChecker);
Dtypes.ts43 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
90 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
Dutilities.ts2456 …export function symbolToDisplayParts(typeChecker: TypeChecker, symbol: Symbol, enclosingDeclaratio…
2458typeChecker.writeSymbol(symbol, enclosingDeclaration, meaning, flags | SymbolFormatFlags.UseAliasD…
/third_party/typescript/src/services/refactors/
DinferFunctionReturnType.ts81 const typeChecker = context.program.getTypeChecker(); constant
82 const returnType = tryGetReturnType(typeChecker, declaration);
87 …const returnTypeNode = typeChecker.typeToTypeNode(returnType, declaration, NodeBuilderFlags.NoTrun…
105 …function tryGetReturnType(typeChecker: TypeChecker, node: ConvertibleDeclaration): Type | undefine…
106 if (typeChecker.isImplementationOfOverload(node)) {
107 const signatures = typeChecker.getTypeAtLocation(node).getCallSignatures();
109 return typeChecker.getUnionType(mapDefined(signatures, s => s.getReturnType()));
112 const signature = typeChecker.getSignatureFromDeclaration(node);
114 return typeChecker.getReturnTypeOfSignature(signature);
DconvertArrowFunctionOrFunctionExpression.ts142 const typeChecker = program.getTypeChecker(); constant
143 const func = tryGetFunctionFromVariableDeclaration(file, typeChecker, token.parent);
144 if (func && !containingThis(func.body) && !typeChecker.containsArgumentsReference(func)) {
154 !typeChecker.containsArgumentsReference(maybeFunc)
156 …if (isFunctionExpression(maybeFunc) && isFunctionReferencedInFile(file, typeChecker, maybeFunc)) r…
167 …function tryGetFunctionFromVariableDeclaration(sourceFile: SourceFile, typeChecker: TypeChecker, p…
173 …tionExpression(initializer) && !isFunctionReferencedInFile(sourceFile, typeChecker, initializer)))…
255 …function isFunctionReferencedInFile(sourceFile: SourceFile, typeChecker: TypeChecker, node: Functi…
256 …!!node.name && FindAllReferences.Core.isSymbolReferencedInFile(node.name, typeChecker, sourceFile);
/third_party/typescript/src/linter/ArkTSLinter_1_0/
DUtils.ts44 let typeChecker: TypeChecker; variable
46 typeChecker = tsTypeChecker;
50 typeChecker = {} as TypeChecker;
233 return typeChecker.getAliasedSymbol(sym);
246 let sym = typeChecker.getSymbolAtLocation(node);
329 const tsTypeNode = typeChecker.typeToTypeNode(tsType, undefined, NodeBuilderFlags.None);
480 const leftHandSymbol = typeChecker.getSymbolAtLocation(propertyAccess.expression);
511 const tsSymbol = typeChecker.getSymbolAtLocation(tsExpr);
549 typeChecker.getConstantValue(tsExpr);
560 typeChecker.getConstantValue(tsExpr);
[all …]
/third_party/typescript/src/linter/ArkTSLinter_1_1/
DUtils.ts45 let typeChecker: TypeChecker; variable
47 typeChecker = tsTypeChecker;
51 typeChecker = {} as TypeChecker;
254 const name = typeChecker.getFullyQualifiedName(symbol);
355 return typeChecker.getAliasedSymbol(sym);
368 let sym = typeChecker.getSymbolAtLocation(node);
459 const name = typeChecker.getFullyQualifiedName(symbol);
633 const leftHandSymbol = typeChecker.getSymbolAtLocation(propertyAccess.expression);
664 const tsSymbol = typeChecker.getSymbolAtLocation(tsExpr);
702 typeChecker.getConstantValue(tsExpr);
[all …]
/third_party/typescript/scripts/
DbuildProtocol.mjs41 * @param {ts.TypeChecker} typeChecker
45 constructor(typeChecker, protocolFile) { argument
46 this.typeChecker = typeChecker;
52 * @param {ts.TypeChecker} typeChecker
56 static getExtraDeclarations(typeChecker, protocolFile) { argument
57 const walker = new DeclarationsWalker(typeChecker, protocolFile);
162 const type = this.typeChecker.getTypeAtLocation(node);
/third_party/typescript/src/testRunner/unittests/
DprogramApi.ts190 const typeChecker = program.getTypeChecker(); constant
192typeChecker.getTypeAtLocation(((sourceFile.statements[0] as ExpressionStatement).expression as AsE…
204 const typeChecker = program.getTypeChecker(); constant
205typeChecker.getSymbolAtLocation((sourceFile.statements[0] as ImportDeclaration).moduleSpecifier);
/third_party/typescript/src/services/codefixes/
DgenerateAccessors.ts243 const typeChecker = program.getTypeChecker(); constant
244 const type = typeChecker.getTypeFromTypeNode(typeNode);
245 if (!typeChecker.isTypeAssignableTo(typeChecker.getUndefinedType(), type)) {
DaddOptionalPropertyUndefined.ts14 const typeChecker = context.program.getTypeChecker(); constant
15 const toAdd = getPropertiesToAdd(context.sourceFile, context.span, typeChecker);
DfixAddMissingMember.ts30 const typeChecker = context.program.getTypeChecker(); constant
31 …o = getInfo(context.sourceFile, context.span.start, context.errorCode, typeChecker, context.progra…
/third_party/typescript/src/compiler/
Dprogram.ts1035 let typeChecker: TypeChecker;
2054 return typeChecker || (typeChecker = createTypeChecker(program));
2186 typeChecker = undefined!;
2217 const typeChecker = getTypeChecker(); constant
2233 …let checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, can…
/third_party/typescript/lib/
Dtypescript.d.ts6082 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
6119 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
/third_party/typescript/tests/baselines/reference/api/
Dtypescript.d.ts6082 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
6119 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];

12