( validator: Validator, input: unknown, options: StandardSchemaV1.Options | undefined )
| 397 | |
| 398 | // a validation Standard Schema asked for, in the context its options pass |
| 399 | export const standardValidated = ( |
| 400 | validator: Validator, |
| 401 | input: unknown, |
| 402 | options: StandardSchemaV1.Options | undefined |
| 403 | ): StandardSchemaV1.Result<unknown> => { |
| 404 | const context = readsContext ? options?.libraryOptions?.context : undefined |
| 405 | // Standard Schema returns its issues, so a configured onFail isn't called. |
| 406 | // Every validator with a ~standard takes a third argument, and one whose |
| 407 | // build configures no onFail ignores it |
| 408 | return standardResultOf( |
| 409 | readsContext && context !== undefined ? |
| 410 | inContext(context as never, () => validator(input, undefined, null)) |
| 411 | : validator(input, undefined, null) |
| 412 | ) |
| 413 | } |
| 414 | |
| 415 | // shorter at each site than a literal |
| 416 | export const siteOf = (( |
no test coverage detected