tsquery icon indicating copy to clipboard operation
tsquery copied to clipboard

TypeScript AST query library

Results 12 tsquery issues
Sort by recently updated
recently updated
newest added

**Problem description** When using replace function to transform code the updated code is said to be printed with the TypeScript [Printer](https://github.com/microsoft/TypeScript-wiki/blob/main/Using-the-Compiler-API.md#creating-and-printing-a-typescript-ast). This seems to get rid of empty lines which...

This pull only involve source code, with .vscode settings trying to fix the spaces (which fail, LOL). Reverting package.json & tsconfig.json. [This patch fix query's ast param without filename. Without...

https://github.com/phenomnomnominal/tsquery/blob/a81e09346c1227a756ddd279e54728753614c2c9/src/matchers/attribute.ts#L39-L53 unlike esquery they dont have any type info, tsquery could be more type infered, for example, with code ``` const routeMap = [{}] ``` we could do somethings like:...

Trying to use a query: `StringLiteral[text=/\/aaa/]` to find a line like: `var s = "/aaa";` Fails with: "SyntaxError: Invalid regular expression: /\/: \ at end of pattern"

As said in #23 I thought the `:root` selector work. But after adding tests cases discussed with @petebacondarwin the implementation of `:root` from `ESquery` is not sufficient to cover the...

Adding Query builder and integration with astexplorer or vscode like copy selector will be more than great

In the code: ```ts interface I{ m(i: number, g: (aParameter1: number)=>void) } ``` I expect that `InterfaceDeclaration > :nth-child(1)` to match only one node (since any node cannot have more...

See https://developer.mozilla.org/en-US/docs/Web/CSS/:scope This selector would allow queries to limit the matching to only the direct children of the AST on which the query is run. For example, in the following...

No exactly issue, but didn't found any alternative way to ask this. Does this lib provide a way to export structure to json as in https://estools.github.io/esquery/? Cannot find anything and...

Fixes #18 This change has two open questions that manifest as ugly code: 1. The jsDoc property is not exposed in the Typescript API because the intended interface is `getJSDocTags`,...