This commit is contained in:
@@ -36,6 +36,22 @@ export const focusArrayAt: {
|
||||
index: number,
|
||||
): Subscribable.Subscribable<A[number], E | NoSuchElementException, R> => Subscribable.mapEffect(self, Array.get(index)))
|
||||
|
||||
/**
|
||||
* Narrows the focus to an indexed element of a readonly tuple.
|
||||
*/
|
||||
export const focusTupleAt: {
|
||||
<T extends readonly [any, ...any[]], I extends number, E, R>(
|
||||
self: Subscribable.Subscribable<T, E, R>,
|
||||
index: I,
|
||||
): Subscribable.Subscribable<T[I], E, R>
|
||||
<T extends readonly [any, ...any[]], I extends number, E, R>(
|
||||
index: I
|
||||
): (self: Subscribable.Subscribable<T, E, R>) => Subscribable.Subscribable<T[I], E, R>
|
||||
} = Function.dual(2, <T extends readonly [any, ...any[]], I extends number, E, R>(
|
||||
self: Subscribable.Subscribable<T, E, R>,
|
||||
index: I,
|
||||
): Subscribable.Subscribable<T[I], E, R> => Subscribable.map(self, Array.unsafeGet(index)))
|
||||
|
||||
/**
|
||||
* Narrows the focus to an indexed element of `Chunk`.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user