UNPKG

@nano-utils/op

Version:

Operator overloading in JS

8 lines (7 loc) 215 B
import { OP } from './utils.js'; export type ASTLiteral<T> = string | number | T; export interface ASTNode<T = any> { [OP]: string; left: ASTLiteral<T> | ASTNode<T>; right: ASTLiteral<T> | ASTNode<T>; }