Add helpers
Lint / lint (push) Successful in 24s

This commit is contained in:
Julien Valverdé
2026-07-16 22:05:59 +02:00
parent cf6c082672
commit 2458316efe
2 changed files with 16 additions and 0 deletions
+5
View File
@@ -912,6 +912,11 @@ export const focusOption: {
*/
export const get = <A, ER, EW, RR, RW>(self: Lens<A, ER, EW, RR, RW>): Effect.Effect<A, ER, RR> => self.get
/**
* Returns the stream of changes from a `Lens`.
*/
export const changes = <A, ER, EW, RR, RW>(self: Lens<A, ER, EW, RR, RW>): Stream.Stream<A, ER, RR> => self.changes
/**
* Atomically modifies the value of a `Lens` and returns a computed result.
*/
+11
View File
@@ -244,3 +244,14 @@ export const focusChunkSize = <A, E, R>(
export const focusIterableSize = <A extends Iterable<any>, E, R>(
self: View<A, E, R>,
): View<number, E, R> => map(self, Iterable.size)
/**
* Reads the current value from a `View`.
*/
export const get = <A, E, R>(self: View<A, E, R>): Effect.Effect<A, E, R> => self.get
/**
* Returns the stream of changes from a `View`.
*/
export const changes = <A, E, R>(self: View<A, E, R>): Stream.Stream<A, E, R> => self.changes