This commit is contained in:
@@ -157,7 +157,6 @@ export const mapField: {
|
|||||||
))
|
))
|
||||||
|
|
||||||
export declare namespace mapMutableField {
|
export declare namespace mapMutableField {
|
||||||
type IfEquals<X, Y, A = X, B = never> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? A : B
|
|
||||||
export type WritableKeys<T> = {
|
export type WritableKeys<T> = {
|
||||||
[K in keyof T]-?: IfEquals<
|
[K in keyof T]-?: IfEquals<
|
||||||
{ [P in K]: T[K] },
|
{ [P in K]: T[K] },
|
||||||
@@ -166,6 +165,8 @@ export declare namespace mapMutableField {
|
|||||||
never
|
never
|
||||||
>
|
>
|
||||||
}[keyof T]
|
}[keyof T]
|
||||||
|
|
||||||
|
type IfEquals<X, Y, A = X, B = never> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? A : B
|
||||||
}
|
}
|
||||||
|
|
||||||
export const mapMutableField: {
|
export const mapMutableField: {
|
||||||
@@ -312,9 +313,3 @@ export const updateAndGetEffect: {
|
|||||||
next => Effect.succeed([next, next] as const),
|
next => Effect.succeed([next, next] as const),
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
declare const lens: Lens<{ readonly a: string, b: number }>
|
|
||||||
const t = lens.pipe(
|
|
||||||
mapMutableField("b")
|
|
||||||
)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user