/// import type { Node, ScriptKind, Selector } from './index'; /** * @public * Find AST `Nodes` within a given `string` of code or AST `Node` matching a `Selector`. * * @param code - the code to be searched. This could be a `string` of TypeScript code, a TypeScript [`SourceFile`](https://github.com/microsoft/TypeScript/blob/main/src/services/types.ts#L159), or a `Node` from a previous query. * @param selector - a TSQuery `Selector` (using the [ESQuery selector syntax](https://github.com/estools/esquery)). * @param scriptKind - the TypeScript [`ScriptKind`](https://github.com/microsoft/TypeScript/blob/main/src/compiler/types.ts#L7305) of the code. Only required when passing a `string` of code. Defaults to `ScriptKind.TSX`. Set this to `ScriptKind.TS` if your code uses the `` syntax for casting. * @returns an `Array` of `Nodes` which match the `Selector`. */ export declare function query(code: string, selector: string | Selector, scriptKind?: ScriptKind): Array; export declare function query(code: Node, selector: string | Selector): Array;