import { Type } from './types'; export interface ValueEquality { readonly someEqual: boolean; readonly someNotEqual: boolean; } /** * Returns the result of comparing all accepted values of one type against all * accepted values of another type. * * In Navi, types represent sets of values. E.g. `int` represents the set of * all integers (ignoring implementation limitations). While most operations * can be thought of in terms of what is done with those sets, this operation * must the thought of in terms of the individual values those sets contain. * When comparing 2 types, this operation is **different** from type equality. * * Conceptually, this function implements this algorithm (*): * * ```ts * let someEqual = false; * let someNotEqual = false; * for (const aValue in iterateValues(a)) { * for (const bValue in iterateValues(b)) { * if (aValue === bValue) { * someEqual = true; * } else { * someNotEqual = true; * } * } * } * ``` * * (*) We don't actually use `===` for equality because of NaN. */ export declare const valueEqual: (a: Type, b: Type) => ValueEquality;