0.2.5 #43

Merged
Thilawyn merged 94 commits from next into master 2026-03-31 21:01:13 +02:00
Showing only changes of commit c338682bf2 - Show all commits

View File

@@ -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")
)