@wootapa/polygraph-ol
Version:
Extension of @wootapa/polygraph for OpenLayers 7+.
56 lines (55 loc) • 1.53 kB
TypeScript
import { IPolygraph } from './polygraph';
import { Logical } from './logical';
export interface IDictionary<T> {
[key: string]: T;
}
export interface IThingGetter<T> {
(key: string): T;
}
export interface IJsonDump {
type: string;
ctorArgs?: any[];
isLogical?: boolean;
isRuntime?: boolean;
operators?: IJsonDump[];
polygraphOpts?: IPolygraphOpts;
}
export interface IPolygraphOpts {
}
export interface IComparisonOpts {
isDate?: boolean;
}
export interface ILikeOptions extends IComparisonOpts {
matchCase: boolean;
wildCard?: string;
}
export interface IJson {
asJson(): IJsonDump;
}
export interface IReport {
id: string;
duration: number;
truths: number;
falses: number;
}
export interface IReportSummary {
duration: number;
truths: number;
falses: number;
details: IReport[];
}
export interface IRuntimeOperatorCallback {
(value: any): boolean;
}
export interface IEvaluatable {
getAlias(): string;
evaluate<T>(obj: ThingOrThingGetter<T>): boolean;
getReport(): IReport;
resetReport(): void;
}
export declare type ThingOrThingGetter<T> = T | IThingGetter<T> | IDictionary<T> | object;
export declare type Primitive = string | number | boolean | Date;
export declare type PrimitiveThing = ThingOrThingGetter<Primitive>;
export declare type Operator = IEvaluatable & IJson;
export declare type Parent = IPolygraph | Logical;
export declare type ClassDict = IDictionary<any>;