Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
unplugin/unplugin-astWorks with
•JSR Score88%•This package works with Node.js, BunIt is unknown whether this package works with Cloudflare Workers, Deno, Browsers




Published3 months ago (0.16.0)
Manipulate the AST to transform your code.
Functions
f
resolveOptions(options: Options): OptionsResolved
No documentation available
f
transform(): Promise<CodeTransform | undefined>
code: string,
id: string,
options: Pick<OptionsResolved, "parserOptions" | "transformer">
No documentation available
Interfaces
I
No documentation available
I
No documentation available
- enforce: "post" | "pre" | undefinedNo documentation available
- exclude: FilterPatternNo documentation available
- include: FilterPatternNo documentation available
- parserOptions: ParserOptionsNo documentation available
- transformer: Arrayable<Transformer<any>>No documentation available
I
No documentation available
- finalize: (s: MagicStringAST) => Awaitable<void>
It will be called after all nodes are transformed
- onNode:(() => Awaitable<boolean>)node: Node,parent: Node | null | undefined,index: number | null | undefined
| (() => node is T)node: Node,parent: Node | null | undefined,index: number | null | undefinedFilter nodes to transform
- transform: () => Awaitable<string | Node | false | undefined | null>node: T,code: string,context: { id: string; }
Transform the node to a new node or string
- transformInclude: (id: string) => Awaitable<boolean>
Filter files to transform
I
No documentation available
- nodes: NodeRef<Node | undefined>[]No documentation available
- transformer: TransformerNo documentation available
Type Aliases
T
OptionsResolved = Overwrite<>
Required<Options>,
{ exclude: Options["exclude"]; enforce: Options["enforce"]; transformer: Transformer<any>[]; }
No documentation available
Variables
v
AST: UnpluginInstance<Options, false>
No documentation available