/** * Type Definitions for Elo * * This module defines the type signatures for Elo's stdlib functions and operators. * It provides a central registry for looking up result types based on function name * and argument types. * * This information is language-agnostic and used by the transform phase for type inference. */ import { EloType } from "./types"; /** * A type signature definition: maps argument types to result type */ export interface TypeSignature { argTypes: EloType[]; resultType: EloType; } /** * Registry of type definitions for functions and operators */ export declare class TypeDefs { private signatures; private fallback; /** * Register a type signature for a function */ register(name: string, argTypes: EloType[], resultType: EloType): this; /** * Register a fallback for unmatched signatures */ registerFallback(handler: (name: string, argTypes: EloType[]) => EloType): this; /** * Look up the result type for a function call. * Tries progressively more general type signatures before falling back. */ lookup(name: string, argTypes: EloType[]): EloType; /** * Check if a function signature is registered */ has(name: string, argTypes: EloType[]): boolean; } /** * Create the standard Elo type definitions */ export declare function createTypeDefs(): TypeDefs; /** * Default type definitions instance */ export declare const eloTypeDefs: TypeDefs; //# sourceMappingURL=typedefs.d.ts.map