tsquery:TypeScript AST查询库

时间:2021-04-29 00:53:10
【文件属性】:
文件名称:tsquery:TypeScript AST查询库
文件大小:84KB
文件格式:ZIP
更新时间:2021-04-29 00:53:10
TypeScript 查询 TSQuery是用于TypeScript的ESQuery API的端口! TSQuery允许您使用CSS样式选择器系统查询TypeScript AST的语法模式。 -请注意,该演示需要JavaScript代码,而不是TypeScript -由精心制作 安装 npm install @phenomnomnominal/tsquery --save-dev 例子 假设我们要选择名称为“动物”的标识符的所有实例,例如, class声明中的标识符,以及extends声明中的标识符。 我们将执行以下操作: import { tsquery } from '@phenomnomnominal/tsquery' ; const typescript = ` class Animal { constructor(public name: string) { } move(d
【文件预览】:
tsquery-master
----src()
--------tsquery-types.ts(3KB)
--------matchers()
--------utils.ts(938B)
--------traverse.ts(4KB)
--------index.ts(632B)
--------query.ts(456B)
--------project.ts(2KB)
--------map.ts(1KB)
--------match.ts(1KB)
--------syntax-kind.ts(558B)
--------parse.ts(921B)
--------ast.ts(298B)
--------replace.ts(816B)
----.codeclimate.yml(259B)
----types()
--------esquery.d.ts(148B)
----.travis.yml(286B)
----tsconfig.json(500B)
----LICENSE(1KB)
----wallaby.js(262B)
----test()
--------replace.spec.ts(2KB)
--------ast.spec.ts(495B)
--------child.spec.ts(1KB)
--------compound.spec.ts(621B)
--------identifier.spec.ts(2KB)
--------index.ts(50B)
--------wildcard.spec.ts(2KB)
--------has.spec.ts(2KB)
--------fixtures()
--------not.spec.ts(2KB)
--------field.spec.ts(2KB)
--------class.spec.ts(960B)
--------project.spec.ts(855B)
--------adjacent.spec.ts(584B)
--------nth-child.spec.ts(2KB)
--------attribute.spec.ts(7KB)
--------types.spec.ts(3KB)
--------sibling.spec.ts(2KB)
--------syntax-kind.spec.ts(725B)
--------map.spec.ts(2KB)
--------matches.spec.ts(2KB)
--------query.spec.ts(1010B)
--------descendant.spec.ts(705B)
--------parse.spec.ts(2KB)
----tslint.json(3KB)
----README.md(4KB)
----.gitignore(86B)
----package-lock.json(223KB)
----package.json(2KB)

网友评论