import type { ParjsCombinator } from "../parjser"; import type { FailureInfo } from "../result"; /** * Applies the source parser, modifying the failure reason to the given message if it fails Softly. * Useful for providing the user with a more meaningful error message than was is provided by * default. * * @param message The new message. */ export declare function reason(message: string): ParjsCombinator; /** * Applies the source parser. If it fails, calls `onFailure` with the failure info and uses the * returned string as the new failure reason. * * @param onFailure A function that takes the failure info and returns the new reason. */ export declare function reason(onFailure: (failure: FailureInfo) => string): ParjsCombinator; //# sourceMappingURL=reason.d.ts.map