import type { ClassDeclaration } from "./class"; import type { Expression } from "./expression"; import type { FunctionDeclaration } from "./function"; import type { Pattern } from "./pattern"; export type VariableKind = "var" | "let" | "const"; export type Declaration = | VariableDeclaration | FunctionDeclaration | ClassDeclaration; export type VariableDeclaration = X & { type: "VariableDeclaration"; declarations: VariableDeclarator[]; kind: VariableKind; }; export type VariableDeclarator = X & { type: "VariableDeclarator"; id: Pattern; init: Expression | null; };