import { Either, Effect } from 'effect';
import type { Registry } from './registry.js.js';
import type { ParseError, EvaluationError, TypeError } from './errors.js.js';
import type { ASTNode } from './parser.js.js';
import type { Limits } from './options.js.js';
interface ParsedExpression {
    (context?: Record<string, unknown>): Effect.Effect<unknown, unknown>;
    check: () => {
        valid: boolean;
        type?: string;
        error?: unknown;
    };
    ast: ASTNode;
}
declare class Environment {
    #private;
    constructor(opts?: {
        unlistedVariablesAreDyn?: boolean;
        limits?: Partial<Limits>;
    } | null, inherited?: Environment);
    clone(opts?: {
        unlistedVariablesAreDyn?: boolean;
        limits?: Partial<Limits>;
    } | null): Environment;
    registerFunction(signature: string, handler?: (...args: unknown[]) => unknown, opts?: unknown): this;
    registerOperator(signature: string, handler?: (...args: unknown[]) => unknown, opts?: unknown): this;
    registerType(typename: string, constructor: unknown): this;
    registerVariable(name: string, type?: unknown, opts?: unknown): this;
    registerConstant(name: string, type: unknown, value: unknown): this;
    getDefinitions(): ReturnType<Registry['getDefinitions']>;
    check(expression: string): Either.Either<string, ParseError | TypeError>;
    parse(expression: string): ParsedExpression;
    evaluate<T>(expression: string, context?: Record<string, unknown>): Effect.Effect<T, ParseError | TypeError | EvaluationError>;
}
export declare function parse(expression: string): ParsedExpression;
export declare function evaluate<T>(expression: string, context?: Record<string, unknown>): Effect.Effect<T, ParseError | TypeError | EvaluationError>;
export { Environment };
