UNPKG

typedraft

Version:

TypeDraft is a superset of typescript with built-in support for DSL extension and literate programming.

13 lines (12 loc) 626 B
import { Node } from "@babel/types"; import { NodePath } from "@babel/traverse"; import { default as Binding } from "@babel/traverse/lib/scope/binding"; import { GeneratorOptions } from "@babel/generator"; export declare function ToAst<T = any>(code: string): T; export declare function ToNodePath<T = any>(code: string): NodePath<T>; /** * only used in test to construct required binding param */ export declare function ToBinding(code: string): Binding; export declare function ToFile(raw: string): import("@babel/types").File; export declare function ToString(node: Node, options?: GeneratorOptions): string;