import type { ExecutionContext, HyperScriptValueType } from '../types/base-types';
export type JSRuntimeType = 'string' | 'number' | 'boolean' | 'null' | 'undefined' | 'object' | 'array' | 'function' | 'element' | 'element-list' | 'node-list' | 'event' | 'date' | 'regexp' | 'promise' | 'symbol' | 'unknown';
export type CoercionFn<TFrom = unknown, TTo = unknown> = (value: TFrom, context?: ExecutionContext) => TTo | null;
export type TypeGuardFn<T = unknown> = (value: unknown) => value is T;
export interface ExpressionTypeDefinition<T = unknown> {
    readonly name: string;
    readonly hyperscriptType: HyperScriptValueType;
    readonly tsType: string;
    readonly isType: TypeGuardFn<T>;
    readonly defaultValue: T | null;
    readonly coerceFrom?: Partial<Record<string, CoercionFn<unknown, T>>>;
    readonly description?: string;
    readonly examples?: T[];
}
export interface ExpressionTypeRegistryConfig {
    strictMode?: boolean;
    cacheCoercions?: boolean;
}
export declare class ExpressionTypeRegistry {
    private types;
    private coercionCache;
    private config;
    constructor(config?: ExpressionTypeRegistryConfig);
    register<T>(definition: ExpressionTypeDefinition<T>): void;
    get(name: string): ExpressionTypeDefinition | undefined;
    has(name: string): boolean;
    getTypeNames(): string[];
    inferType(value: unknown): string;
    getHyperScriptType(value: unknown): HyperScriptValueType;
    coerce<T>(value: unknown, targetType: string, context?: ExecutionContext): T | null;
    canCoerce(value: unknown, targetType: string): boolean;
    getCoercionInfo(sourceType: string, targetType: string): {
        possible: boolean;
        direct: boolean;
        via?: string;
    };
    clearCache(): void;
    getStats(): {
        typeCount: number;
        cacheSize: number;
        typeNames: string[];
    };
    private registerBuiltinTypes;
}
export declare const expressionTypeRegistry: ExpressionTypeRegistry;
export declare function inferExpressionType(value: unknown): string;
export declare function coerceToType<T>(value: unknown, targetType: string, context?: ExecutionContext): T | null;
export declare function canCoerceToType(value: unknown, targetType: string): boolean;
export declare function getHyperScriptTypeName(value: unknown): HyperScriptValueType;
export declare function coerceToString(value: unknown, context?: ExecutionContext): string;
export declare function coerceToNumber(value: unknown, context?: ExecutionContext): number | null;
export declare function coerceToBoolean(value: unknown, context?: ExecutionContext): boolean;
export declare function coerceToElement(value: unknown, context?: ExecutionContext): Element | null;
export declare function coerceToElementList(value: unknown, context?: ExecutionContext): Element[];
export declare function coerceToArray(value: unknown, context?: ExecutionContext): unknown[];
export declare function coerceToObject(value: unknown, context?: ExecutionContext): Record<string, unknown> | null;
//# sourceMappingURL=type-registry.d.ts.map