Home
last modified time | relevance | path

Searched refs:findAncestor (Results 1 – 25 of 49) sorted by relevance

12

/third_party/typescript/src/services/codefixes/
DfixSpelling.ts73 const importDeclaration = findAncestor(node, isImportDeclaration)!;
81 const tag = findAncestor(node, isJsxOpeningLikeElement)!;
86 const baseDeclaration = findAncestor(node, isClassLike);
DfixInvalidImportSyntax.ts43 …const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), a => a.kind === targ…
71 …const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), a => a.getStart() ==…
DaddMissingConst.ts26 const forInitializer = findAncestor(token, node =>
46 const commaExpression = findAncestor(token, node =>
DremoveAccidentalCallParentheses.ts10 …const callExpression = findAncestor(getTokenAtPosition(context.sourceFile, context.span.start), is…
DaddMissingInvocationForDecorator.ts17 const decorator = findAncestor(token, isDecorator)!;
DsplitTypeOnlyImport.ts22 return findAncestor(getTokenAtPosition(sourceFile, span.start), isImportDeclaration);
DcorrectQualifiedNameToIndexedAccessType.ts24 const qualifiedName = findAncestor(getTokenAtPosition(sourceFile, pos), isQualifiedName)!;
DaddConvertToUnknownForNonOverlappingTypes.ts31 …return findAncestor(getTokenAtPosition(sourceFile, pos), (n): n is AsExpression | TypeAssertion =>…
DfixIncorrectNamedTupleSyntax.ts22 …return findAncestor(token, t => t.kind === SyntaxKind.NamedTupleMember) as NamedTupleMember | unde…
DfixReturnTypeInAsyncFunction.ts47 const func = findAncestor(token, isFunctionLikeDeclaration);
DfixUnreachableCode.ts19 const statement = findAncestor(token, isStatement)!;
DfixJSDocTypes.ts47 const decl = findAncestor(getTokenAtPosition(sourceFile, pos), isTypeContainer);
DaddMissingAsync.ts70 const decl = findAncestor(token, node => {
DfixOverrideModifier.ts184 const classElement = findAncestor(token, node => {
DfixImportNonExportedMember.ts78 const importDeclaration = findAncestor(token, isImportDeclaration);
DfixAddMissingMember.ts636 …const declaration = findAncestor(callExpression, n => isMethodDeclaration(n) || isConstructorDecla…
649 if (findAncestor(node, isJsxExpression)) {
650 const returnStatement = findAncestor(node.parent, isReturnStatement);
/third_party/typescript/src/services/refactors/
DextractType.ts99 …const selection = findAncestor(current, (node => node.parent && isTypeNode(node) && !rangeContains…
104 …const firstStatement = Debug.checkDefined(findAncestor(selection, isStatement), "Should find a sta…
166 …const conditionalTypeNode = findAncestor(node, n => isConditionalTypeNode(n) && rangeContainsSkipT…
172 const functionLikeNode = findAncestor(node.parent, isFunctionLike);
DinferFunctionReturnType.ts74 const declaration = findAncestor(token, n =>
DconvertOverloadListToSingleSignature.ts184 const containingDecl = findAncestor(node, isConvertableSignatureDeclaration);
DconvertParamsToDestructuredObject.ts340 const containingJSDoc = findAncestor(node, isJSDocNode);
342 const containingNonJSDoc = findAncestor(containingJSDoc, n => !isJSDocNode(n));
DconvertStringOrTemplateLiteral.ts91 const container = findAncestor(expr.parent, n => {
DextractSymbol.ts671 const containingFunction = findAncestor(current, isFunctionLikeDeclaration);
684 … current = findAncestor(current, parent => isFunctionLikeDeclaration(parent))!.parent;
1244 …else if (node.parent.kind === SyntaxKind.ExpressionStatement && scope === findAncestor(node, isSco…
1787 …return !!findAncestor(node, n => isDeclarationWithTypeParameters(n) && getEffectiveTypeParameterDe…
1996 …return findAncestor(node, node => node.parent && isExtractableExpression(node) && !isBinaryExpress…
/third_party/typescript/src/services/
DgoToDefinition.ts30 const functionDeclaration = findAncestor(node.parent, n =>
54 …aration = forEach([node, ...symbol?.declarations || emptyArray], n => findAncestor(n, isAnyImportO…
190 const classElement = findAncestor(node, isClassElement);
193 const baseDeclaration = findAncestor(classElement, isClassLike);
376 const containingAssignment = findAncestor(node, p => {
508 const target = findAncestor(node, n => !isRightSideOfPropertyAccess(n));
DcallHierarchy.ts249 const ancestor = findAncestor(location, isValidCallHierarchyDeclaration);
257 const ancestor = findAncestor(location.parent, isValidCallHierarchyDeclaration);
327 const ancestor = findAncestor(node, isValidCallHierarchyDeclaration) || sourceFile;
DdocumentHighlights.ts184 return findAncestor(statement, node => {
519 …return !!findAncestor(node.parent, owner => !isLabeledStatement(owner) ? "quit" : owner.label.esca…

12