Home
last modified time | relevance | path

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

12

/third_party/typescript/src/services/
DgoToDefinition.ts15 const typeChecker = program.getTypeChecker(); constant
20 …return label ? [createDefinitionInfoFromName(typeChecker, label, ScriptElementKind.label, node.tex…
23 const symbol = getSymbol(node, typeChecker);
28 return getDefinitionInfoForIndexSignatures(node, typeChecker);
34 return getDefinitionFromSymbol(typeChecker, symbol, node);
37 const calledDeclaration = tryGetSignatureDeclaration(typeChecker, node);
40 …ent) && isConstructorLike(calledDeclaration)) && !isVirtualConstructor(typeChecker, calledDeclarat…
41 … const sigInfo = createDefinitionFromSignatureDeclaration(typeChecker, calledDeclaration);
44 … if (typeChecker.getRootSymbols(symbol).some(s => symbolMatchesSignature(s, calledDeclaration))) {
54 … const defs = getDefinitionFromSymbol(typeChecker, symbol, node, calledDeclaration) || emptyArray;
[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)) {
69 … const unionPropertyKind = forEach(typeChecker.getRootSymbols(symbol), rootSymbol => {
78 … const typeOfUnionProperty = typeChecker.getTypeOfSymbolAtLocation(symbol, location);
122 export function getSymbolModifiers(typeChecker: TypeChecker, symbol: Symbol): string {
[all …]
DcallHierarchy.ts90 …function getSymbolOfCallHierarchyDeclaration(typeChecker: TypeChecker, node: CallHierarchyDeclarat…
92 return location && typeChecker.getSymbolAtLocation(location);
119 const typeChecker = program.getTypeChecker(); constant
120 const symbol = typeChecker.getSymbolAtLocation(declName);
122 text = typeChecker.symbolToString(symbol, node);
160 …function findImplementation(typeChecker: TypeChecker, node: Extract<CallHierarchyDeclaration, Func…
161 …function findImplementation(typeChecker: TypeChecker, node: FunctionLikeDeclaration): FunctionLike…
162 …function findImplementation(typeChecker: TypeChecker, node: FunctionLikeDeclaration): FunctionLike…
170 const symbol = getSymbolOfCallHierarchyDeclaration(typeChecker, node);
179 function findAllInitialDeclarations(typeChecker: TypeChecker, node: CallHierarchyDeclaration) {
[all …]
Dcompletions.ts170 const typeChecker = program.getTypeChecker(); constant
178 …etions.getStringLiteralCompletions(sourceFile, position, contextToken, typeChecker, compilerOption…
195 …return completionInfoFromData(sourceFile, typeChecker, compilerOptions, log, completionData, prefe…
218 …function completionInfoFromData(sourceFile: SourceFile, typeChecker: TypeChecker, compilerOptions:…
262 typeChecker,
287 typeChecker,
378 typeChecker: TypeChecker,
449 kind: SymbolDisplay.getSymbolKind(typeChecker, symbol, location!), // TODO: GH#18217
450 kindModifiers: SymbolDisplay.getSymbolModifiers(typeChecker, symbol),
454 …isRecommended: isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker) || undefin…
[all …]
Drename.ts14 …function getRenameInfoForNode(node: Node, typeChecker: TypeChecker, sourceFile: SourceFile, isDefi…
15 const symbol = typeChecker.getSymbolAtLocation(node);
18 const type = getContextualTypeOrAncestorTypeNodeType(node, typeChecker);
49 const kind = SymbolDisplay.getSymbolKind(typeChecker, symbol, node);
53 const displayName = specifierName || typeChecker.symbolToString(symbol);
54 const fullDisplayName = specifierName || typeChecker.getFullyQualifiedName(symbol);
55 …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 …]
DstringCompletions.ts114 …ies(sourceFile: SourceFile, node: StringLiteralLike, position: number, typeChecker: TypeChecker, c…
124 … kind: StringLiteralCompletionKind.Types, types: getStringLiteralTypes(typeChecker.getTypeArgument…
139 … return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType));
141 …getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker) };
147 …const types = getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(grandParent as UnionType…
168 return stringLiteralCompletionsForObjectLiteral(typeChecker, parent.parent);
181 … return stringLiteralCompletionsFromProperties(typeChecker.getTypeAtLocation(expression));
193 … argumentInfo ? getStringLiteralCompletionsFromSignature(argumentInfo, typeChecker) : fromContextu…
206 …getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker) };
215 ….Types, types: getStringLiteralTypes(getContextualTypeFromParent(node, typeChecker)), isNewIdentif…
[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);
DorganizeImports.ts87 const typeChecker = program.getTypeChecker(); constant
88 const jsxNamespace = typeChecker.getJsxNamespace(sourceFile);
89 const jsxFragmentFactory = typeChecker.getJsxFragmentFactory(sourceFile);
155 … FindAllReferences.Core.isSymbolReferencedInFile(identifier, typeChecker, sourceFile);
Dclassifier.ts455 …export function getSemanticClassifications(typeChecker: TypeChecker, cancellationToken: Cancellati…
456 …return convertClassificationsToSpans(getEncodedSemanticClassifications(typeChecker, cancellationTo…
483 …export function getEncodedSemanticClassifications(typeChecker: TypeChecker, cancellationToken: Can…
496 const symbol = typeChecker.getSymbolAtLocation(node);
497 … const type = symbol && classifySymbol(symbol, getMeaningFromLocation(node), typeChecker);
Dservices.ts1608 const typeChecker = program.getTypeChecker(); constant
1610 const symbol = getSymbolAtLocationForQuickInfo(nodeForQuickInfo, typeChecker);
1612 if (!symbol || typeChecker.isUnknownSymbol(symbol)) {
1613 …const type = shouldGetType(sourceFile, nodeForQuickInfo, position) ? typeChecker.getTypeAtLocation…
1618 …displayParts: typeChecker.runWithCancellationToken(cancellationToken, typeChecker => typeToDisplay…
1619 … documentation: type.symbol ? type.symbol.getDocumentationComment(typeChecker) : undefined,
1624 …ind, displayParts, documentation, tags } = typeChecker.runWithCancellationToken(cancellationToken,…
1625 …SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, get…
1629 kindModifiers: SymbolDisplay.getSymbolModifiers(typeChecker, symbol),
Dtypes.ts43 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
86 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
Dutilities.ts2214 …export function symbolToDisplayParts(typeChecker: TypeChecker, symbol: Symbol, enclosingDeclaratio…
2216typeChecker.writeSymbol(symbol, enclosingDeclaration, meaning, flags | SymbolFormatFlags.UseAliasD…
/third_party/typescript/src/services/refactors/
DinferFunctionReturnType.ts67 const typeChecker = context.program.getTypeChecker(); constant
68 const returnType = tryGetReturnType(typeChecker, declaration);
73 …const returnTypeNode = typeChecker.typeToTypeNode(returnType, declaration, NodeBuilderFlags.NoTrun…
91 …function tryGetReturnType(typeChecker: TypeChecker, node: ConvertibleDeclaration): Type | undefine…
92 if (typeChecker.isImplementationOfOverload(node)) {
93 const signatures = typeChecker.getTypeAtLocation(node).getCallSignatures();
95 return typeChecker.getUnionType(mapDefined(signatures, s => s.getReturnType()));
98 const signature = typeChecker.getSignatureFromDeclaration(node);
100 return typeChecker.getReturnTypeOfSignature(signature);
DconvertArrowFunctionOrFunctionExpression.ts142 const typeChecker = program.getTypeChecker(); constant
143 const func = tryGetFunctionFromVariableDeclaration(file, typeChecker, token.parent);
155 …if (isFunctionExpression(maybeFunc) && isFunctionReferencedInFile(file, typeChecker, maybeFunc)) r…
166 …function tryGetFunctionFromVariableDeclaration(sourceFile: SourceFile, typeChecker: TypeChecker, p…
172 …tionExpression(initializer) && !isFunctionReferencedInFile(sourceFile, typeChecker, initializer)))…
247 …function isFunctionReferencedInFile(sourceFile: SourceFile, typeChecker: TypeChecker, node: Functi…
248 …!!node.name && FindAllReferences.Core.isSymbolReferencedInFile(node.name, typeChecker, sourceFile);
/third_party/typescript/src/linter/
DUtils.ts43 let typeChecker: TypeChecker; variable
45 typeChecker = tsTypeChecker;
228 return typeChecker.getAliasedSymbol(sym);
241 let sym = typeChecker.getSymbolAtLocation(node);
320 const tsTypeNode = typeChecker.typeToTypeNode(tsType, undefined, NodeBuilderFlags.None);
471 const leftHandSymbol = typeChecker.getSymbolAtLocation(propertyAccess.expression);
502 const tsSymbol = typeChecker.getSymbolAtLocation(tsExpr);
540 typeChecker.getConstantValue(tsExpr);
551 typeChecker.getConstantValue(tsExpr);
561 const tsConstValue = typeChecker.getConstantValue(tsExpr);
[all …]
/third_party/typescript/scripts/
DbuildProtocol.ts19 private constructor(private typeChecker: ts.TypeChecker, private protocolFile: ts.SourceFile) { property in DeclarationsWalker
22 static getExtraDeclarations(typeChecker: ts.TypeChecker, protocolFile: ts.SourceFile): string {
23 const walker = new DeclarationsWalker(typeChecker, protocolFile);
114 const type = this.typeChecker.getTypeAtLocation(node);
/third_party/typescript/src/testRunner/unittests/
DprogramApi.ts190 const typeChecker = program.getDiagnosticsProducingTypeChecker(); constant
192typeChecker.getTypeAtLocation(((sourceFile.statements[0] as ExpressionStatement).expression as AsE…
204 const typeChecker = program.getDiagnosticsProducingTypeChecker(); constant
205typeChecker.getSymbolAtLocation((sourceFile.statements[0] as ImportDeclaration).moduleSpecifier);
/third_party/typescript/src/services/codefixes/
DgenerateAccessors.ts248 const typeChecker = program.getTypeChecker(); constant
249 const type = typeChecker.getTypeFromTypeNode(typeNode);
250 if (!typeChecker.isTypeAssignableTo(typeChecker.getUndefinedType(), type)) {
DfixAddMissingMember.ts17 const typeChecker = context.program.getTypeChecker(); constant
18 … const info = getInfo(context.sourceFile, context.span.start, typeChecker, context.program);
/third_party/typescript/lib/
DtypescriptServices.js107889 var typeChecker = getDiagnosticsProducingTypeChecker();
107897 …var checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, can…
117894 function symbolToDisplayParts(typeChecker, symbol, enclosingDeclaration, meaning, flags) { argument
117897typeChecker.writeSymbol(symbol, enclosingDeclaration, meaning, flags | 8 /* UseAliasDefinedOutside…
119030 …function getSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiableNames,… argument
119031 …return convertClassificationsToSpans(getEncodedSemanticClassifications(typeChecker, cancellationTo…
119057 …function getEncodedSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiabl… argument
119069 var symbol = typeChecker.getSymbolAtLocation(node);
119070 … var type = symbol && classifySymbol(symbol, ts.getMeaningFromLocation(node), typeChecker);
119640 var typeChecker = program.getTypeChecker();
[all …]
Dtsserverlibrary.js107889 var typeChecker = getDiagnosticsProducingTypeChecker();
107897 …var checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, can…
117894 function symbolToDisplayParts(typeChecker, symbol, enclosingDeclaration, meaning, flags) { argument
117897typeChecker.writeSymbol(symbol, enclosingDeclaration, meaning, flags | 8 /* UseAliasDefinedOutside…
119030 …function getSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiableNames,… argument
119031 …return convertClassificationsToSpans(getEncodedSemanticClassifications(typeChecker, cancellationTo…
119057 …function getEncodedSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiabl… argument
119069 var symbol = typeChecker.getSymbolAtLocation(node);
119070 … var type = symbol && classifySymbol(symbol, ts.getMeaningFromLocation(node), typeChecker);
119640 var typeChecker = program.getTypeChecker();
[all …]
Dtsserver.js107695 var typeChecker = getDiagnosticsProducingTypeChecker();
107703 …var checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, can…
117325 function symbolToDisplayParts(typeChecker, symbol, enclosingDeclaration, meaning, flags) { argument
117328typeChecker.writeSymbol(symbol, enclosingDeclaration, meaning, flags | 8 /* UseAliasDefinedOutside…
118461 …function getSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiableNames,… argument
118462 …return convertClassificationsToSpans(getEncodedSemanticClassifications(typeChecker, cancellationTo…
118488 …function getEncodedSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiabl… argument
118500 var symbol = typeChecker.getSymbolAtLocation(node);
118501 … var type = symbol && classifySymbol(symbol, ts.getMeaningFromLocation(node), typeChecker);
119071 var typeChecker = program.getTypeChecker();
[all …]
Dtypescript.js107889 var typeChecker = getDiagnosticsProducingTypeChecker();
107897 …var checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, can…
117894 function symbolToDisplayParts(typeChecker, symbol, enclosingDeclaration, meaning, flags) { argument
117897typeChecker.writeSymbol(symbol, enclosingDeclaration, meaning, flags | 8 /* UseAliasDefinedOutside…
119030 …function getSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiableNames,… argument
119031 …return convertClassificationsToSpans(getEncodedSemanticClassifications(typeChecker, cancellationTo…
119057 …function getEncodedSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiabl… argument
119069 var symbol = typeChecker.getSymbolAtLocation(node);
119070 … var type = symbol && classifySymbol(symbol, ts.getMeaningFromLocation(node), typeChecker);
119640 var typeChecker = program.getTypeChecker();
[all …]
/third_party/typescript/src/compiler/
Dprogram.ts1915 const typeChecker = getDiagnosticsProducingTypeChecker(); constant
1925 …const checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, c… constant

12