UNPKG

covertable

Version:

Efficient TypeScript library for pairwise testing, generating minimal covering arrays with constraint support.

26 lines (25 loc) 1.06 kB
import type { Expression, Comparer, DictType } from './types'; export type TriState = true | false | null; /** * Resolve a dot-separated field path against a row object. * Returns `undefined` if any segment is missing. */ export declare function resolve(row: DictType, field: string): any; /** * Extract the set of top-level factor keys that a condition depends on. * For dot-separated paths, only the first segment is returned (that is the * factor key; deeper segments are properties within the factor value). */ export declare function extractKeys(c: Expression): Set<string>; /** * Evaluate a `Condition` against a (possibly incomplete) row under Kleene * three-valued logic. * * - `true` — the condition is satisfied * - `false` — the condition is definitively violated * - `null` — a referenced field is missing; the result is inconclusive * * The `comparer` is only called when both operands are resolved (not * `undefined`). */ export declare function evaluate(c: Expression, row: DictType, comparer?: Comparer): TriState;