prop
prop<
S>(): <K>(key) =>Optional<S,NonNullable<S[K]>>
Defined in: Core/Optional.ts:51
Creates an Optional that focuses on an optional property of an object.
Only keys whose type includes undefined (i.e. field?: T) are accepted.
Call with the structure type first, then the key.
Type Parameters
Section titled “Type Parameters”S
Returns
Section titled “Returns”<K>(key) => Optional<S, NonNullable<S[K]>>