( decode: Decode, defaultParseOptions: SchemaAST.ParseOptions = DefaultParseOptions )
| 74 | type DecodeLike = (schema: any) => (input: any, options?: SchemaAST.ParseOptions) => any |
| 75 | |
| 76 | export const withDefaultParseOptions = <Decode extends DecodeLike>( |
| 77 | decode: Decode, |
| 78 | defaultParseOptions: SchemaAST.ParseOptions = DefaultParseOptions |
| 79 | ): Decode => |
| 80 | ((schema: any) => { |
| 81 | const run = decode(schema) |
| 82 | return (input: any, options?: SchemaAST.ParseOptions) => run(input, { ...defaultParseOptions, ...options }) |
| 83 | }) as Decode |
| 84 | |
| 85 | // TODO: v4 migration - Date is no longer by default encoded to string. |
| 86 |
no test coverage detected
searching dependent graphs…