7 lines
394 B
TypeScript
Executable file
7 lines
394 B
TypeScript
Executable file
import type { AST } from '@angular/compiler';
|
|
import type { Node } from '@angular/compiler/src/render3/r3_ast';
|
|
declare type ASTOrNodeWithParent = (AST | Node) & {
|
|
parent?: ASTOrNodeWithParent;
|
|
};
|
|
export declare function getNearestNodeFrom<T extends ASTOrNodeWithParent>({ parent }: ASTOrNodeWithParent, predicate: (parent: ASTOrNodeWithParent) => parent is T): T | null;
|
|
export {};
|