@mojir/lits
Version:
Lits is a pure functional programming language implemented in TypeScript
11 lines (10 loc) • 742 B
TypeScript
import type { Arity } from '../builtin/interface';
import type { FunctionLike } from '../parser/types';
import type { SourceCodeInfo } from '../tokenizer/token';
export declare function arityAccepts(arity: Arity, nbrOfParams: number): boolean;
export declare function arityAcceptsMin(arity: Arity, nbrOfParams: number): boolean;
export declare function getCommonArityFromFunctions(params: FunctionLike[]): Arity | null;
export declare function getArityFromFunction(param: FunctionLike): Arity;
export declare function assertNumberOfParams(arity: Arity, length: number, sourceCodeInfo: SourceCodeInfo | undefined): void;
export declare function canBeOperator(count: Arity): boolean;
export declare function toFixedArity(arity: number): Arity;