* Focuses on a property of the current struct/tuple focus. * * **Details** * * - On a Lens, returns a Lens. * - On an Optional, returns an Optional. * - Does **not** work on union types (compile error). * * **Example** (Drilling into nested structs) * *
(
this: Lens<S, A>,
key: Key,
..._err: ForbidUnion<A, "cannot use `key` on a union type">
)
| 521 | * ``` |
| 522 | */ |
| 523 | key<S, A extends object, Key extends keyof A>( |
| 524 | this: Lens<S, A>, |
| 525 | key: Key, |
| 526 | ..._err: ForbidUnion<A, "cannot use `key` on a union type"> |
no outgoing calls
no test coverage detected