sucrase
Version:
Super-fast alternative to Babel for when you can target modern JS runtimes
16 lines (15 loc) • 742 B
TypeScript
import { Node as NodeType, NodeBase } from "../types";
import { Position } from "../util/location";
import UtilParser from "./util";
export declare class NodeUtils extends UtilParser {
startNode<T extends NodeType>(): T;
startNodeAt<T extends NodeType>(pos: number, loc: Position): T;
/** Start a new node with a previous node's location. */
startNodeAtNode<T extends NodeType>(type: NodeType): T;
finishNode<T extends NodeType>(node: T, type: string): T;
finishNodeAt<T extends NodeType>(node: T, type: string, pos: number, loc: Position): T;
/**
* Reset the start location of node to the start location of locationNode
*/
resetStartLocationFromNode(node: NodeBase, locationNode: NodeBase): void;
}