UNPKG

covertable

Version:

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

43 lines (42 loc) 1.54 kB
import type { Expression, FilterRowType, OptionsType, SubModelType } from '../types'; import type { PictFactorsType, PictModelIssue } from './types'; export interface PictModelOptions { caseInsensitive?: boolean; strict?: boolean; } export declare class PictModel { private _parameters; private _subModels; private _negatives; private _weights; private _lexer; private _controller; issues: PictModelIssue[]; constructor(input: string, options?: PictModelOptions); get parameters(): PictFactorsType; get subModels(): SubModelType[]; get constraints(): Expression[]; get negatives(): Map<string, Set<string | number>>; get weights(): { [factorKey: string]: { [index: number]: number; }; }; get progress(): number; get stats(): import("..").ControllerStats | null; /** * Evaluate all constraints and the negative-value rule against a * (typically complete) row. Returns true if the row passes. */ filter: (row: FilterRowType) => boolean; /** * Convert this model's constraints into `Expression[]` for the controller. * Each lexer filter becomes a `custom` condition with its dependency keys. * The negative-value rule also becomes a `custom` condition. */ private _modelConstraints; private _buildOptions; private _applyNegativePrefix; make(options?: OptionsType<PictFactorsType>): any[]; makeAsync(options?: OptionsType<PictFactorsType>): Generator<any, void, unknown>; }