import { type Option, type Result } from 'sts:result';
export type Ordering = -1 | 0 | 1;
export interface Eq<T> {
    // #[effects(add: [], unknown: [direct])]
    equals(left: T, right: T): boolean;
}
export interface Order<T> extends Eq<T> {
    // #[effects(add: [], unknown: [direct])]
    compare(left: T, right: T): Ordering;
}
type EqValue<TEq> = TEq extends Eq<infer TValue> ? TValue : never;
export declare const stringEq: Eq<string>;
export declare const numberEq: Eq<number>;
export declare const booleanEq: Eq<boolean>;
export declare const bigintEq: Eq<bigint>;
// #[effects(add: [])]
export declare function lazyEq<T>(getEq: () => Eq<T>): Eq<T>;
// #[effects(add: [])]
export declare function arrayEq<T>(itemEq: Eq<T>): Eq<readonly T[]>;
// #[effects(add: [])]
export declare function tupleEq<const TEqs extends readonly Eq<unknown>[]>(...elements: TEqs): Eq<{
    readonly [K in keyof TEqs]: EqValue<TEqs[K]>;
}>;
// #[effects(add: [])]
export declare function optionEq<T>(itemEq: Eq<T>): Eq<Option<T>>;
// #[effects(add: [])]
export declare function resultEq<T, E>(okEq: Eq<T>, errEq: Eq<E>): Eq<Result<T, E>>;
// #[effects(add: [])]
export declare function fromCompare<T>(compare: (left: T, right: T) => number): Order<T>;
// #[effects(add: [])]
export declare function reverse<T>(order: Order<T>): Order<T>;
// #[effects(add: [])]
export declare function thenBy<T>(primary: Order<T>, secondary: Order<T>): Order<T>;
export {};
