* Narrows the focus to a subtype `B` using a type guard. * * **Details** * * - On a Prism, returns a Prism. * - On an Optional, returns an Optional. * - Pass optional `annotations` to customize the error message. * * **Example** (Narrowing a union) * * `
(
this: Prism<S, A>,
refinement: (a: A) => a is B,
annotations?: Schema.Annotations.Filter
)
| 685 | * inner issue is {@link SchemaIssue.MissingKey}, for both `getResult` and |
| 686 | * `replaceResult`. |
| 687 | * |
| 688 | * **Example** (Accessing records safely) |
| 689 | * |
| 690 | * ```ts import.meta.vitest |
no outgoing calls
no test coverage detected