Type aliases
GetPath
GetPath<O, K>: K extends [] ? O : { complete: Head<K> extends keyof O ? O[Head<K>] : never; continue: Head<K> extends keyof O ? GetPath<O[Head<K>], Tail<K>> : never }[[] extends Tail<K> ? "complete" : "continue"]
Type parameters
-
O
-
K: ReadonlyArray<PropertyKey>
LensInput
LensInput<A>: A extends Lens<infer R, any> ? R : never
Type parameters
LensOutput
LensOutput<A>: A extends Lens<any, infer R> ? R : never
Type parameters
PathLensKeys
PathLensKeys<A>: A extends PathLens<infer Keys> ? Keys : never
Type parameters
PathToRecord
PathToRecord<K, R>: Tail<K> extends [] ? {} : {}
Type parameters
-
K: ReadonlyArray<PropertyKey>
-
R
PipeLenses
PipeLenses<A>: A extends ReadonlyArray<PropLens<any>> ? PathLens<GetPropKeys<A>> : GetPipedLenses<LensInput<Head<A>>, LensOutput<Head<A>>, Tail<A>>
Type parameters
PropLensKey
PropLensKey<A>: A extends PropLens<infer K> ? K : never
Type parameters
@typed/lenses
A pretty basic Lenses library.