/** * The values a flow's keys hold, each read to one type or refused. * * Every key has one type, so a value that is not of it is a fault rather than * a coercion: `retry: "2"` was written by someone who meant something, and * guessing what is how a flow ends up running a way its file does not say. */ import type { FaultList } from "./fault.ts"; import type { FlowNode } from "./node.ts"; /** A non-empty string. */ export declare function text(value: unknown, at: string, faults: FaultList): string | undefined; /** A whole number, zero or more. */ export declare function count(value: unknown, at: string, faults: FaultList): number | undefined; /** A duration written `90s`, `10m` or `1h`, in milliseconds. */ export declare function duration(value: unknown, at: string, faults: FaultList): number | undefined; /** `text` read as a duration the way a flow writes one, `90s`, `10m` or `1h`, in milliseconds; nothing when it is not one. */ export declare function parseDuration(text: string): number | undefined; /** A list of non-empty strings, none twice. */ export declare function texts(value: unknown, at: string, faults: FaultList): string[] | undefined; /** One of a closed set of words. */ export declare function oneOf(value: unknown, words: readonly T[], at: string, faults: FaultList): T | undefined; /** `true` or `false`, written as such. */ export declare function flag(value: unknown, at: string, faults: FaultList): boolean | undefined; /** A whole number, one or more. */ export declare function positive(value: unknown, at: string, faults: FaultList): number | undefined; /** * The nodes of a sequence written with at least one, or `undefined`, saying * `why` when it was written empty. */ export declare function body(nodes: FlowNode[], written: unknown, at: string, faults: FaultList, why: string): FlowNode[] | undefined; //# sourceMappingURL=value.d.ts.map