import { IParser, OnParse } from "./interfaces"; import { Parser } from "./parser"; /** * This is needed when the typescript has a recursive, mutual types * type Things = string | [OtherThings] * type OtherThings = {type: 'other', value:Things } */ export declare class DeferredParser implements IParser { readonly description: { readonly name: "Deferred"; readonly children: readonly []; readonly extras: readonly []; }; private parser?; static create(): DeferredParser; private constructor(); setParser(parser: IParser): this; parse(a: unknown, onParse: OnParse): C | D; } /** * Must pass the shape that we expect since typescript as of this point * can't infer with recursive like structures like this. * @returns [Parser, setParser] Use the setParser to set the parser later */ export declare function deferred(): readonly [Parser, (parser: IParser) => void];