* Focuses on a key only if it exists (`Object.hasOwn`). Both * `getResult` and `replaceResult` fail when the key is absent. * * **Details** * * Unlike `.key()`, which always succeeds on the read side, `.at()` is * useful for Records or arrays where the key/index may not be present.
(
this: Optional<S, A>,
key: Key,
..._err: ForbidUnion<A, "cannot use `at` on a union type">
)
| 701 | * @see `.key()` — when the key is always present |
| 702 | */ |
| 703 | at<S, A extends object, Key extends keyof A>( |
| 704 | this: Optional<S, A>, |
| 705 | key: Key, |
| 706 | ..._err: ForbidUnion<A, "cannot use `at` on a union type"> |
no outgoing calls