parjs
Version:
Library for building parsers using combinators.
15 lines • 523 B
TypeScript
import type { Parjser } from "../parjser";
import type { FailureInfo } from "../result";
/**
* Returns a parser that fails softly with a given reason.
*
* @param reason The reason for the failure.
*/
export declare function nope<T>(reason: string): Parjser<T>;
/**
* Returns a parser that will always fail with the given failure info.
*
* @param pFailure How the parser should fail.
*/
export declare function fail<T = never>(pFailure?: Partial<FailureInfo> | string): Parjser<T>;
//# sourceMappingURL=fail.d.ts.map