This commit is contained in:
@@ -298,10 +298,13 @@ export const focusChunkAt: {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads the current value from the Lens.
|
* Reads the current value from a `Lens`.
|
||||||
*/
|
*/
|
||||||
export const get = <A, ER, EW, RR, RW>(self: Lens<A, ER, EW, RR, RW>): Effect.Effect<A, ER, RR> => self.get
|
export const get = <A, ER, EW, RR, RW>(self: Lens<A, ER, EW, RR, RW>): Effect.Effect<A, ER, RR> => self.get
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of a `Lens`.
|
||||||
|
*/
|
||||||
export const set: {
|
export const set: {
|
||||||
<A, ER, EW, RR, RW>(value: A): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<void, ER | EW, RR | RW>
|
<A, ER, EW, RR, RW>(value: A): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<void, ER | EW, RR | RW>
|
||||||
<A, ER, EW, RR, RW>(self: Lens<A, ER, EW, RR, RW>, value: A): Effect.Effect<void, ER | EW, RR | RW>
|
<A, ER, EW, RR, RW>(self: Lens<A, ER, EW, RR, RW>, value: A): Effect.Effect<void, ER | EW, RR | RW>
|
||||||
@@ -310,7 +313,7 @@ export const set: {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the `Lens` to a new value and returns the previous value.
|
* Sets a `Lens` to a new value and returns the previous value.
|
||||||
*/
|
*/
|
||||||
export const getAndSet: {
|
export const getAndSet: {
|
||||||
<A, ER, EW, RR, RW>(value: A): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<A, ER | EW, RR | RW>
|
<A, ER, EW, RR, RW>(value: A): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<A, ER | EW, RR | RW>
|
||||||
@@ -320,7 +323,7 @@ export const getAndSet: {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Applies a synchronous transformation to the focused value, discarding the previous value.
|
* Applies a synchronous transformation to the value of a `Lens`, discarding the previous value.
|
||||||
*/
|
*/
|
||||||
export const update: {
|
export const update: {
|
||||||
<A, ER, EW, RR, RW>(f: (a: A) => A): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<void, ER | EW, RR | RW>
|
<A, ER, EW, RR, RW>(f: (a: A) => A): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<void, ER | EW, RR | RW>
|
||||||
@@ -330,7 +333,7 @@ export const update: {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Applies an effectful transformation to the focused value, discarding the previous value.
|
* Applies an effectful transformation to the value of a `Lens`, discarding the previous value.
|
||||||
*/
|
*/
|
||||||
export const updateEffect: {
|
export const updateEffect: {
|
||||||
<A, ER, EW, RR, RW, E, R>(f: (a: A) => Effect.Effect<A, E, R>): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<void, ER | EW | E, RR | RW | R>
|
<A, ER, EW, RR, RW, E, R>(f: (a: A) => Effect.Effect<A, E, R>): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<void, ER | EW | E, RR | RW | R>
|
||||||
@@ -343,7 +346,7 @@ export const updateEffect: {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Applies a synchronous transformation while returning the previous value.
|
* Applies a synchronous transformation the value of a `Lens` while returning the previous value.
|
||||||
*/
|
*/
|
||||||
export const getAndUpdate: {
|
export const getAndUpdate: {
|
||||||
<A, ER, EW, RR, RW>(f: (a: A) => A): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<A, ER | EW, RR | RW>
|
<A, ER, EW, RR, RW>(f: (a: A) => A): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<A, ER | EW, RR | RW>
|
||||||
@@ -353,7 +356,7 @@ export const getAndUpdate: {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Applies an effectful transformation while returning the previous value.
|
* Applies an effectful transformation the value of a `Lens` while returning the previous value.
|
||||||
*/
|
*/
|
||||||
export const getAndUpdateEffect: {
|
export const getAndUpdateEffect: {
|
||||||
<A, ER, EW, RR, RW, E, R>(f: (a: A) => Effect.Effect<A, E, R>): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<A, ER | EW | E, RR | RW | R>
|
<A, ER, EW, RR, RW, E, R>(f: (a: A) => Effect.Effect<A, E, R>): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<A, ER | EW | E, RR | RW | R>
|
||||||
@@ -366,7 +369,7 @@ export const getAndUpdateEffect: {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value and returns the new value.
|
* Sets the value of a `Lens` and returns the new value.
|
||||||
*/
|
*/
|
||||||
export const setAndGet: {
|
export const setAndGet: {
|
||||||
<A, ER, EW, RR, RW>(value: A): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<A, ER | EW, RR | RW>
|
<A, ER, EW, RR, RW>(value: A): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<A, ER | EW, RR | RW>
|
||||||
@@ -376,7 +379,7 @@ export const setAndGet: {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Applies a synchronous update and returns the new value.
|
* Applies a synchronous update the value of a `Lens` and returns the new value.
|
||||||
*/
|
*/
|
||||||
export const updateAndGet: {
|
export const updateAndGet: {
|
||||||
<A, ER, EW, RR, RW>(f: (a: A) => A): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<A, ER | EW, RR | RW>
|
<A, ER, EW, RR, RW>(f: (a: A) => A): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<A, ER | EW, RR | RW>
|
||||||
@@ -389,7 +392,7 @@ export const updateAndGet: {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Applies an effectful update and returns the new value.
|
* Applies an effectful update to the value of a `Lens` and returns the new value.
|
||||||
*/
|
*/
|
||||||
export const updateAndGetEffect: {
|
export const updateAndGetEffect: {
|
||||||
<A, ER, EW, RR, RW, E, R>(f: (a: A) => Effect.Effect<A, E, R>): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<A, ER | EW | E, RR | RW | R>
|
<A, ER, EW, RR, RW, E, R>(f: (a: A) => Effect.Effect<A, E, R>): (self: Lens<A, ER, EW, RR, RW>) => Effect.Effect<A, ER | EW | E, RR | RW | R>
|
||||||
|
|||||||
Reference in New Issue
Block a user