import Runtype, { type Parsed, type Static } from "./Runtype.js"; /** * Adds a parser to the given runtype. * * Possible failures when `check`-ing: * * - Failures of the inner runtype * * Possible failures when `parse`-ing: * * - Failures of the inner runtype * - `PARSING_FAILED` with `thrown` reporting the thrown value from the parser function */ interface Parser> extends Runtype, X> { tag: "parser"; underlying: R; parser: (value: Parsed) => X; } declare const Parser: (underlying: R, parser: (value: Parsed) => X) => Parser; export default Parser;