@mojir/lits
Version:
Lits is a Lisp dialect implemented in TypeScript
20 lines (19 loc) • 899 B
TypeScript
export declare const NodeTypes: {
readonly Number: 1;
readonly String: 2;
readonly NormalExpression: 3;
readonly SpecialExpression: 4;
readonly UserDefinedSymbol: 5;
readonly NormalBuiltinSymbol: 6;
readonly SpecialBuiltinSymbol: 7;
readonly ReservedSymbol: 8;
readonly Binding: 9;
readonly Spread: 10;
};
export type NodeType = typeof NodeTypes[keyof typeof NodeTypes];
export declare function getNodeTypeName(type: NodeType): keyof typeof NodeTypes;
export declare function isNodeType(type: unknown): type is NodeType;
declare const functionTypes: readonly ["UserDefined", "Partial", "Comp", "Constantly", "Juxt", "Complement", "EveryPred", "SomePred", "Fnull", "Builtin", "SpecialBuiltin", "NativeJsFunction"];
export type FunctionType = typeof functionTypes[number];
export declare function isFunctionType(type: unknown): type is FunctionType;
export {};