0.2.0 #5
@@ -57,13 +57,20 @@ extends Pipeable.Class() implements LensWithInternals<A, ER, EW, RR, RW> {
|
|||||||
readonly [LensTypeId]: LensTypeId = LensTypeId
|
readonly [LensTypeId]: LensTypeId = LensTypeId
|
||||||
readonly [LensWithInternalsTypeId]: LensWithInternalsTypeId = LensWithInternalsTypeId
|
readonly [LensWithInternalsTypeId]: LensWithInternalsTypeId = LensWithInternalsTypeId
|
||||||
|
|
||||||
|
readonly get: Effect.Effect<A, ER, RR>
|
||||||
|
readonly changes: Stream.Stream<A, ER, RR>
|
||||||
|
readonly update: (a: A) => Effect.Effect<void, EW, RW>
|
||||||
|
readonly semaphore: Effect.Semaphore
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
readonly get: Effect.Effect<A, ER, RR>,
|
source: LensImpl.Source<A, ER, EW, RR, RW>
|
||||||
readonly changes: Stream.Stream<A, ER, RR>,
|
|
||||||
readonly update: (a: A) => Effect.Effect<void, EW, RW>,
|
|
||||||
readonly semaphore: Effect.Semaphore,
|
|
||||||
) {
|
) {
|
||||||
super()
|
super()
|
||||||
|
|
||||||
|
this.get = source.get
|
||||||
|
this.changes = source.changes
|
||||||
|
this.update = source.update
|
||||||
|
this.semaphore = source.semaphore
|
||||||
}
|
}
|
||||||
|
|
||||||
modifyEffect<B, E1 = never, R1 = never>(
|
modifyEffect<B, E1 = never, R1 = never>(
|
||||||
@@ -83,7 +90,7 @@ extends Pipeable.Class() implements LensWithInternals<A, ER, EW, RR, RW> {
|
|||||||
*/
|
*/
|
||||||
export const make = <A, ER, EW, RR, RW>(
|
export const make = <A, ER, EW, RR, RW>(
|
||||||
source: LensImpl.Source<A, ER, EW, RR, RW>
|
source: LensImpl.Source<A, ER, EW, RR, RW>
|
||||||
): Lens<A, ER, EW, RR, RW> => new LensImpl(source.get, source.changes, source.update, source.semaphore)
|
): Lens<A, ER, EW, RR, RW> => new LensImpl(source)
|
||||||
|
|
||||||
|
|
||||||
export class LensLazyImpl<in out A, in out ER = never, in out EW = never, in out RR = never, in out RW = never>
|
export class LensLazyImpl<in out A, in out ER = never, in out EW = never, in out RR = never, in out RW = never>
|
||||||
|
|||||||
Reference in New Issue
Block a user