UNPKG

flowjv

Version:

Flow based approach to JSON validation!

23 lines (22 loc) 714 B
import { IFlowSchema } from ".."; import { IAtom } from "../blocks/flowatoms"; import { IObjectIfBlock, IObjectSwitchBlock } from "../blocks/object"; export declare const lookup: { atom(fschema: IFlowSchema, path: string[]): IAtom | null; block(fschema: IFlowSchema, blockId: string): { block: IObjectIfBlock | IObjectSwitchBlock | null; ref: string[]; }; }; declare type ITraverseGenerator = Generator<{ type: "primitive"; ref: string[]; schema: IAtom; } | { type: "block"; blockId?: string; ref: string[]; schema: IObjectIfBlock | IObjectSwitchBlock; }, void, any>; export declare function traverse(flowSchema: IFlowSchema): ITraverseGenerator; export {};