Searched refs:findAncestor (Results 1 – 25 of 49) sorted by relevance
12
/third_party/typescript/src/services/codefixes/ |
D | fixSpelling.ts | 73 const importDeclaration = findAncestor(node, isImportDeclaration)!; 81 const tag = findAncestor(node, isJsxOpeningLikeElement)!; 86 const baseDeclaration = findAncestor(node, isClassLike);
|
D | fixInvalidImportSyntax.ts | 43 …const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), a => a.kind === targ… 71 …const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), a => a.getStart() ==…
|
D | addMissingConst.ts | 26 const forInitializer = findAncestor(token, node => 46 const commaExpression = findAncestor(token, node =>
|
D | removeAccidentalCallParentheses.ts | 10 …const callExpression = findAncestor(getTokenAtPosition(context.sourceFile, context.span.start), is…
|
D | addMissingInvocationForDecorator.ts | 17 const decorator = findAncestor(token, isDecorator)!;
|
D | splitTypeOnlyImport.ts | 22 return findAncestor(getTokenAtPosition(sourceFile, span.start), isImportDeclaration);
|
D | correctQualifiedNameToIndexedAccessType.ts | 24 const qualifiedName = findAncestor(getTokenAtPosition(sourceFile, pos), isQualifiedName)!;
|
D | addConvertToUnknownForNonOverlappingTypes.ts | 31 …return findAncestor(getTokenAtPosition(sourceFile, pos), (n): n is AsExpression | TypeAssertion =>…
|
D | fixIncorrectNamedTupleSyntax.ts | 22 …return findAncestor(token, t => t.kind === SyntaxKind.NamedTupleMember) as NamedTupleMember | unde…
|
D | fixReturnTypeInAsyncFunction.ts | 47 const func = findAncestor(token, isFunctionLikeDeclaration);
|
D | fixUnreachableCode.ts | 19 const statement = findAncestor(token, isStatement)!;
|
D | fixJSDocTypes.ts | 47 const decl = findAncestor(getTokenAtPosition(sourceFile, pos), isTypeContainer);
|
D | addMissingAsync.ts | 70 const decl = findAncestor(token, node => {
|
D | fixOverrideModifier.ts | 184 const classElement = findAncestor(token, node => {
|
D | fixImportNonExportedMember.ts | 78 const importDeclaration = findAncestor(token, isImportDeclaration);
|
D | fixAddMissingMember.ts | 636 …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/ |
D | extractType.ts | 99 …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);
|
D | inferFunctionReturnType.ts | 74 const declaration = findAncestor(token, n =>
|
D | convertOverloadListToSingleSignature.ts | 184 const containingDecl = findAncestor(node, isConvertableSignatureDeclaration);
|
D | convertParamsToDestructuredObject.ts | 340 const containingJSDoc = findAncestor(node, isJSDocNode); 342 const containingNonJSDoc = findAncestor(containingJSDoc, n => !isJSDocNode(n));
|
D | convertStringOrTemplateLiteral.ts | 91 const container = findAncestor(expr.parent, n => {
|
D | extractSymbol.ts | 671 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/ |
D | goToDefinition.ts | 30 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));
|
D | callHierarchy.ts | 249 const ancestor = findAncestor(location, isValidCallHierarchyDeclaration); 257 const ancestor = findAncestor(location.parent, isValidCallHierarchyDeclaration); 327 const ancestor = findAncestor(node, isValidCallHierarchyDeclaration) || sourceFile;
|
D | documentHighlights.ts | 184 return findAncestor(statement, node => { 519 …return !!findAncestor(node.parent, owner => !isLabeledStatement(owner) ? "quit" : owner.label.esca…
|
12