effect-app 4.0.0-beta.146 → 4.0.0-beta.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/Operations.d.ts +9 -841
- package/dist/Operations.d.ts.map +1 -1
- package/dist/Schema/Class.d.ts +2 -2
- package/dist/Schema/Class.d.ts.map +1 -1
- package/dist/Schema.d.ts +7 -2
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +29 -3
- package/package.json +1 -1
- package/src/Schema.ts +43 -5
- package/test/special.test.ts +43 -0
package/dist/Operations.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export declare const OperationId: S.WithDefaults<Omit<S.brand<S.String, "NonEmpt
|
|
|
23
23
|
readonly "~type.make": S.StringId;
|
|
24
24
|
}>;
|
|
25
25
|
};
|
|
26
|
-
declare const OperationProgress_base: import("effect/Schema").Opaque<OperationProgress, Omit<
|
|
26
|
+
declare const OperationProgress_base: import("effect/Schema").Opaque<OperationProgress, Omit<S.Struct<{
|
|
27
27
|
readonly completed: S.WithDefaults<Omit<S.brand<import("effect/Schema").Int, "Int" | "NonNegativeInt" | "NonNegativeNumber">, "Iso" | "Type" | "~type.make"> & {
|
|
28
28
|
readonly Type: S.NonNegativeInt;
|
|
29
29
|
readonly Iso: S.NonNegativeInt;
|
|
@@ -62,41 +62,9 @@ declare const OperationProgress_base: import("effect/Schema").Opaque<OperationPr
|
|
|
62
62
|
readonly "~type.make": S.NonNegativeInt;
|
|
63
63
|
}>;
|
|
64
64
|
};
|
|
65
|
-
}> & {
|
|
66
|
-
readonly copy: {
|
|
67
|
-
<A extends InstanceType<new (_: any) => {
|
|
68
|
-
readonly completed: S.NonNegativeInt;
|
|
69
|
-
readonly total: S.NonNegativeInt;
|
|
70
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
71
|
-
readonly completed: S.NonNegativeInt;
|
|
72
|
-
readonly total: S.NonNegativeInt;
|
|
73
|
-
}>>>(f: (a: A) => { [K in keyof U & ("completed" | "total")]?: U[K]; }): (self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A) => { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
74
|
-
<A extends InstanceType<new (_: any) => {
|
|
75
|
-
readonly completed: S.NonNegativeInt;
|
|
76
|
-
readonly total: S.NonNegativeInt;
|
|
77
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
78
|
-
readonly completed: S.NonNegativeInt;
|
|
79
|
-
readonly total: S.NonNegativeInt;
|
|
80
|
-
}>>>(updates: { [K in keyof U & ("completed" | "total")]?: U[K]; }): (self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A) => { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
81
|
-
} & {
|
|
82
|
-
<A extends InstanceType<new (_: any) => {
|
|
83
|
-
readonly completed: S.NonNegativeInt;
|
|
84
|
-
readonly total: S.NonNegativeInt;
|
|
85
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
86
|
-
readonly completed: S.NonNegativeInt;
|
|
87
|
-
readonly total: S.NonNegativeInt;
|
|
88
|
-
}>>>(self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A, f: (a: A) => { [K in keyof U & ("completed" | "total")]?: U[K]; }): { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
89
|
-
<A extends InstanceType<new (_: any) => {
|
|
90
|
-
readonly completed: S.NonNegativeInt;
|
|
91
|
-
readonly total: S.NonNegativeInt;
|
|
92
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
93
|
-
readonly completed: S.NonNegativeInt;
|
|
94
|
-
readonly total: S.NonNegativeInt;
|
|
95
|
-
}>>>(self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A, updates: { [K in keyof U & ("completed" | "total")]?: U[K]; }): { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
96
|
-
};
|
|
97
|
-
}, "Encoded"> & {
|
|
65
|
+
}>, "Encoded"> & {
|
|
98
66
|
readonly Encoded: OperationProgress.Encoded;
|
|
99
|
-
}, {}> & Omit<
|
|
67
|
+
}, {}> & Omit<S.Struct<{
|
|
100
68
|
readonly completed: S.WithDefaults<Omit<S.brand<import("effect/Schema").Int, "Int" | "NonNegativeInt" | "NonNegativeNumber">, "Iso" | "Type" | "~type.make"> & {
|
|
101
69
|
readonly Type: S.NonNegativeInt;
|
|
102
70
|
readonly Iso: S.NonNegativeInt;
|
|
@@ -135,39 +103,7 @@ declare const OperationProgress_base: import("effect/Schema").Opaque<OperationPr
|
|
|
135
103
|
readonly "~type.make": S.NonNegativeInt;
|
|
136
104
|
}>;
|
|
137
105
|
};
|
|
138
|
-
}
|
|
139
|
-
readonly copy: {
|
|
140
|
-
<A extends InstanceType<new (_: any) => {
|
|
141
|
-
readonly completed: S.NonNegativeInt;
|
|
142
|
-
readonly total: S.NonNegativeInt;
|
|
143
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
144
|
-
readonly completed: S.NonNegativeInt;
|
|
145
|
-
readonly total: S.NonNegativeInt;
|
|
146
|
-
}>>>(f: (a: A) => { [K in keyof U & ("completed" | "total")]?: U[K]; }): (self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A) => { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
147
|
-
<A extends InstanceType<new (_: any) => {
|
|
148
|
-
readonly completed: S.NonNegativeInt;
|
|
149
|
-
readonly total: S.NonNegativeInt;
|
|
150
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
151
|
-
readonly completed: S.NonNegativeInt;
|
|
152
|
-
readonly total: S.NonNegativeInt;
|
|
153
|
-
}>>>(updates: { [K in keyof U & ("completed" | "total")]?: U[K]; }): (self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A) => { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
154
|
-
} & {
|
|
155
|
-
<A extends InstanceType<new (_: any) => {
|
|
156
|
-
readonly completed: S.NonNegativeInt;
|
|
157
|
-
readonly total: S.NonNegativeInt;
|
|
158
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
159
|
-
readonly completed: S.NonNegativeInt;
|
|
160
|
-
readonly total: S.NonNegativeInt;
|
|
161
|
-
}>>>(self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A, f: (a: A) => { [K in keyof U & ("completed" | "total")]?: U[K]; }): { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
162
|
-
<A extends InstanceType<new (_: any) => {
|
|
163
|
-
readonly completed: S.NonNegativeInt;
|
|
164
|
-
readonly total: S.NonNegativeInt;
|
|
165
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
166
|
-
readonly completed: S.NonNegativeInt;
|
|
167
|
-
readonly total: S.NonNegativeInt;
|
|
168
|
-
}>>>(self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A, updates: { [K in keyof U & ("completed" | "total")]?: U[K]; }): { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
169
|
-
};
|
|
170
|
-
}, keyof S.Top>;
|
|
106
|
+
}>, keyof S.Top>;
|
|
171
107
|
export declare class OperationProgress extends OperationProgress_base {
|
|
172
108
|
}
|
|
173
109
|
declare const OperationSuccess_base: import("effect/Schema").Opaque<OperationSuccess, Omit<import("effect/Schema").TaggedStruct<"OperationSuccess", {
|
|
@@ -390,7 +326,7 @@ export declare const OperationResult: S.Union<[typeof OperationSuccess, typeof O
|
|
|
390
326
|
};
|
|
391
327
|
};
|
|
392
328
|
export type OperationResult = S.Schema.Type<typeof OperationResult>;
|
|
393
|
-
declare const Operation_base: import("effect/Schema").Opaque<Operation, Omit<
|
|
329
|
+
declare const Operation_base: import("effect/Schema").Opaque<Operation, Omit<S.Struct<{
|
|
394
330
|
readonly id: S.WithDefaults<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
395
331
|
readonly Type: S.StringId;
|
|
396
332
|
readonly Iso: S.StringId;
|
|
@@ -470,393 +406,9 @@ declare const Operation_base: import("effect/Schema").Opaque<Operation, Omit<imp
|
|
|
470
406
|
withDefault: S.withConstructorDefault<S.DateFromString>;
|
|
471
407
|
withDecodingDefaultType: S.withDecodingDefaultType<S.DateFromString>;
|
|
472
408
|
}>>;
|
|
473
|
-
}> & {
|
|
474
|
-
readonly copy: {
|
|
475
|
-
<A extends InstanceType<new (_: any) => {
|
|
476
|
-
readonly createdAt: Date;
|
|
477
|
-
readonly id: S.StringId;
|
|
478
|
-
readonly progress?: OperationProgress | undefined;
|
|
479
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
480
|
-
readonly title: S.NonEmptyString2k;
|
|
481
|
-
readonly updatedAt: Date | null;
|
|
482
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
483
|
-
readonly createdAt: Date;
|
|
484
|
-
readonly id: S.StringId;
|
|
485
|
-
readonly progress?: OperationProgress | undefined;
|
|
486
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
487
|
-
readonly title: S.NonEmptyString2k;
|
|
488
|
-
readonly updatedAt: Date | null;
|
|
489
|
-
}>>>(f: (a: A) => { [K in keyof U & ("createdAt" | "id" | "title" | "updatedAt" | import("effect/Schema").Struct.TypeOptionalKeys<{
|
|
490
|
-
readonly id: S.WithDefaults<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
491
|
-
readonly Type: S.StringId;
|
|
492
|
-
readonly Iso: S.StringId;
|
|
493
|
-
readonly "~type.make": S.StringId;
|
|
494
|
-
} & {
|
|
495
|
-
make: () => S.StringId;
|
|
496
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
497
|
-
readonly Type: S.StringId;
|
|
498
|
-
readonly Iso: S.StringId;
|
|
499
|
-
readonly "~type.make": S.StringId;
|
|
500
|
-
}>;
|
|
501
|
-
}> & Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
502
|
-
readonly Type: S.StringId;
|
|
503
|
-
readonly Iso: S.StringId;
|
|
504
|
-
readonly "~type.make": S.StringId;
|
|
505
|
-
} & {
|
|
506
|
-
make: () => S.StringId;
|
|
507
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
508
|
-
readonly Type: S.StringId;
|
|
509
|
-
readonly Iso: S.StringId;
|
|
510
|
-
readonly "~type.make": S.StringId;
|
|
511
|
-
}>;
|
|
512
|
-
};
|
|
513
|
-
readonly title: S.WithDefaults<Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
514
|
-
readonly Type: S.NonEmptyString2k;
|
|
515
|
-
readonly Iso: S.NonEmptyString2k;
|
|
516
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
517
|
-
}> & Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
518
|
-
readonly Type: S.NonEmptyString2k;
|
|
519
|
-
readonly Iso: S.NonEmptyString2k;
|
|
520
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
521
|
-
};
|
|
522
|
-
readonly progress: S.optional<typeof OperationProgress>;
|
|
523
|
-
readonly result: S.optional<S.Union<[typeof OperationSuccess, typeof OperationFailure]> & {
|
|
524
|
-
readonly cases: {
|
|
525
|
-
OperationFailure: typeof OperationFailure;
|
|
526
|
-
OperationSuccess: typeof OperationSuccess;
|
|
527
|
-
};
|
|
528
|
-
readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: OperationFailure | OperationSuccess) => value is Extract<OperationFailure, {
|
|
529
|
-
_tag: Keys;
|
|
530
|
-
}> | Extract<OperationSuccess, {
|
|
531
|
-
_tag: Keys;
|
|
532
|
-
}>;
|
|
533
|
-
readonly guards: {
|
|
534
|
-
OperationFailure: (u: unknown) => u is OperationFailure;
|
|
535
|
-
OperationSuccess: (u: unknown) => u is OperationSuccess;
|
|
536
|
-
};
|
|
537
|
-
readonly match: {
|
|
538
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(value: OperationFailure | OperationSuccess, cases: Cases): Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
539
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(cases: Cases): (value: OperationFailure | OperationSuccess) => Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
540
|
-
};
|
|
541
|
-
} & {
|
|
542
|
-
readonly tags: import("effect/Schema").Literals<["OperationSuccess", "OperationFailure"]>;
|
|
543
|
-
readonly generateGuards: <K extends string>(property: K) => {
|
|
544
|
-
readonly isOperationFailure: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationFailure; };
|
|
545
|
-
readonly isOperationSuccess: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationSuccess; };
|
|
546
|
-
} & {
|
|
547
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: Extract<OperationFailure, {
|
|
548
|
-
readonly _tag: Tags[number];
|
|
549
|
-
}> | Extract<OperationSuccess, {
|
|
550
|
-
readonly _tag: Tags[number];
|
|
551
|
-
}>; };
|
|
552
|
-
};
|
|
553
|
-
readonly generateGuardsFor: <A_1>() => <K extends { [K_1 in keyof A_1 & string]: A_1[K_1] extends OperationFailure | OperationSuccess ? K_1 : never; }[keyof A_1 & string]>(property: K) => {
|
|
554
|
-
readonly isOperationFailure: (target: A_1) => target is A_1 & { readonly [P in K]: OperationFailure; };
|
|
555
|
-
readonly isOperationSuccess: (target: A_1) => target is A_1 & { readonly [P in K]: OperationSuccess; };
|
|
556
|
-
} & {
|
|
557
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => (target: A_1) => target is A_1 & { readonly [P in K]: Extract<OperationFailure, {
|
|
558
|
-
readonly _tag: Tags[number];
|
|
559
|
-
}> | Extract<OperationSuccess, {
|
|
560
|
-
readonly _tag: Tags[number];
|
|
561
|
-
}>; };
|
|
562
|
-
};
|
|
563
|
-
}>;
|
|
564
|
-
readonly createdAt: S.withConstructorDefault<S.DateFromString>;
|
|
565
|
-
readonly updatedAt: S.withConstructorDefault<import("effect/Schema").NullOr<S.DateFromString & {
|
|
566
|
-
withDefault: S.withConstructorDefault<S.DateFromString>;
|
|
567
|
-
withDecodingDefaultType: S.withDecodingDefaultType<S.DateFromString>;
|
|
568
|
-
}>>;
|
|
569
|
-
}>)]?: U[K]; }): (self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A) => { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
570
|
-
<A extends InstanceType<new (_: any) => {
|
|
571
|
-
readonly createdAt: Date;
|
|
572
|
-
readonly id: S.StringId;
|
|
573
|
-
readonly progress?: OperationProgress | undefined;
|
|
574
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
575
|
-
readonly title: S.NonEmptyString2k;
|
|
576
|
-
readonly updatedAt: Date | null;
|
|
577
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
578
|
-
readonly createdAt: Date;
|
|
579
|
-
readonly id: S.StringId;
|
|
580
|
-
readonly progress?: OperationProgress | undefined;
|
|
581
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
582
|
-
readonly title: S.NonEmptyString2k;
|
|
583
|
-
readonly updatedAt: Date | null;
|
|
584
|
-
}>>>(updates: { [K in keyof U & ("createdAt" | "id" | "title" | "updatedAt" | import("effect/Schema").Struct.TypeOptionalKeys<{
|
|
585
|
-
readonly id: S.WithDefaults<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
586
|
-
readonly Type: S.StringId;
|
|
587
|
-
readonly Iso: S.StringId;
|
|
588
|
-
readonly "~type.make": S.StringId;
|
|
589
|
-
} & {
|
|
590
|
-
make: () => S.StringId;
|
|
591
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
592
|
-
readonly Type: S.StringId;
|
|
593
|
-
readonly Iso: S.StringId;
|
|
594
|
-
readonly "~type.make": S.StringId;
|
|
595
|
-
}>;
|
|
596
|
-
}> & Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
597
|
-
readonly Type: S.StringId;
|
|
598
|
-
readonly Iso: S.StringId;
|
|
599
|
-
readonly "~type.make": S.StringId;
|
|
600
|
-
} & {
|
|
601
|
-
make: () => S.StringId;
|
|
602
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
603
|
-
readonly Type: S.StringId;
|
|
604
|
-
readonly Iso: S.StringId;
|
|
605
|
-
readonly "~type.make": S.StringId;
|
|
606
|
-
}>;
|
|
607
|
-
};
|
|
608
|
-
readonly title: S.WithDefaults<Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
609
|
-
readonly Type: S.NonEmptyString2k;
|
|
610
|
-
readonly Iso: S.NonEmptyString2k;
|
|
611
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
612
|
-
}> & Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
613
|
-
readonly Type: S.NonEmptyString2k;
|
|
614
|
-
readonly Iso: S.NonEmptyString2k;
|
|
615
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
616
|
-
};
|
|
617
|
-
readonly progress: S.optional<typeof OperationProgress>;
|
|
618
|
-
readonly result: S.optional<S.Union<[typeof OperationSuccess, typeof OperationFailure]> & {
|
|
619
|
-
readonly cases: {
|
|
620
|
-
OperationFailure: typeof OperationFailure;
|
|
621
|
-
OperationSuccess: typeof OperationSuccess;
|
|
622
|
-
};
|
|
623
|
-
readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: OperationFailure | OperationSuccess) => value is Extract<OperationFailure, {
|
|
624
|
-
_tag: Keys;
|
|
625
|
-
}> | Extract<OperationSuccess, {
|
|
626
|
-
_tag: Keys;
|
|
627
|
-
}>;
|
|
628
|
-
readonly guards: {
|
|
629
|
-
OperationFailure: (u: unknown) => u is OperationFailure;
|
|
630
|
-
OperationSuccess: (u: unknown) => u is OperationSuccess;
|
|
631
|
-
};
|
|
632
|
-
readonly match: {
|
|
633
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(value: OperationFailure | OperationSuccess, cases: Cases): Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
634
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(cases: Cases): (value: OperationFailure | OperationSuccess) => Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
635
|
-
};
|
|
636
|
-
} & {
|
|
637
|
-
readonly tags: import("effect/Schema").Literals<["OperationSuccess", "OperationFailure"]>;
|
|
638
|
-
readonly generateGuards: <K extends string>(property: K) => {
|
|
639
|
-
readonly isOperationFailure: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationFailure; };
|
|
640
|
-
readonly isOperationSuccess: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationSuccess; };
|
|
641
|
-
} & {
|
|
642
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: Extract<OperationFailure, {
|
|
643
|
-
readonly _tag: Tags[number];
|
|
644
|
-
}> | Extract<OperationSuccess, {
|
|
645
|
-
readonly _tag: Tags[number];
|
|
646
|
-
}>; };
|
|
647
|
-
};
|
|
648
|
-
readonly generateGuardsFor: <A_1>() => <K extends { [K_1 in keyof A_1 & string]: A_1[K_1] extends OperationFailure | OperationSuccess ? K_1 : never; }[keyof A_1 & string]>(property: K) => {
|
|
649
|
-
readonly isOperationFailure: (target: A_1) => target is A_1 & { readonly [P in K]: OperationFailure; };
|
|
650
|
-
readonly isOperationSuccess: (target: A_1) => target is A_1 & { readonly [P in K]: OperationSuccess; };
|
|
651
|
-
} & {
|
|
652
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => (target: A_1) => target is A_1 & { readonly [P in K]: Extract<OperationFailure, {
|
|
653
|
-
readonly _tag: Tags[number];
|
|
654
|
-
}> | Extract<OperationSuccess, {
|
|
655
|
-
readonly _tag: Tags[number];
|
|
656
|
-
}>; };
|
|
657
|
-
};
|
|
658
|
-
}>;
|
|
659
|
-
readonly createdAt: S.withConstructorDefault<S.DateFromString>;
|
|
660
|
-
readonly updatedAt: S.withConstructorDefault<import("effect/Schema").NullOr<S.DateFromString & {
|
|
661
|
-
withDefault: S.withConstructorDefault<S.DateFromString>;
|
|
662
|
-
withDecodingDefaultType: S.withDecodingDefaultType<S.DateFromString>;
|
|
663
|
-
}>>;
|
|
664
|
-
}>)]?: U[K]; }): (self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A) => { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
665
|
-
} & {
|
|
666
|
-
<A extends InstanceType<new (_: any) => {
|
|
667
|
-
readonly createdAt: Date;
|
|
668
|
-
readonly id: S.StringId;
|
|
669
|
-
readonly progress?: OperationProgress | undefined;
|
|
670
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
671
|
-
readonly title: S.NonEmptyString2k;
|
|
672
|
-
readonly updatedAt: Date | null;
|
|
673
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
674
|
-
readonly createdAt: Date;
|
|
675
|
-
readonly id: S.StringId;
|
|
676
|
-
readonly progress?: OperationProgress | undefined;
|
|
677
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
678
|
-
readonly title: S.NonEmptyString2k;
|
|
679
|
-
readonly updatedAt: Date | null;
|
|
680
|
-
}>>>(self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A, f: (a: A) => { [K in keyof U & ("createdAt" | "id" | "title" | "updatedAt" | import("effect/Schema").Struct.TypeOptionalKeys<{
|
|
681
|
-
readonly id: S.WithDefaults<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
682
|
-
readonly Type: S.StringId;
|
|
683
|
-
readonly Iso: S.StringId;
|
|
684
|
-
readonly "~type.make": S.StringId;
|
|
685
|
-
} & {
|
|
686
|
-
make: () => S.StringId;
|
|
687
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
688
|
-
readonly Type: S.StringId;
|
|
689
|
-
readonly Iso: S.StringId;
|
|
690
|
-
readonly "~type.make": S.StringId;
|
|
691
|
-
}>;
|
|
692
|
-
}> & Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
693
|
-
readonly Type: S.StringId;
|
|
694
|
-
readonly Iso: S.StringId;
|
|
695
|
-
readonly "~type.make": S.StringId;
|
|
696
|
-
} & {
|
|
697
|
-
make: () => S.StringId;
|
|
698
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
699
|
-
readonly Type: S.StringId;
|
|
700
|
-
readonly Iso: S.StringId;
|
|
701
|
-
readonly "~type.make": S.StringId;
|
|
702
|
-
}>;
|
|
703
|
-
};
|
|
704
|
-
readonly title: S.WithDefaults<Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
705
|
-
readonly Type: S.NonEmptyString2k;
|
|
706
|
-
readonly Iso: S.NonEmptyString2k;
|
|
707
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
708
|
-
}> & Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
709
|
-
readonly Type: S.NonEmptyString2k;
|
|
710
|
-
readonly Iso: S.NonEmptyString2k;
|
|
711
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
712
|
-
};
|
|
713
|
-
readonly progress: S.optional<typeof OperationProgress>;
|
|
714
|
-
readonly result: S.optional<S.Union<[typeof OperationSuccess, typeof OperationFailure]> & {
|
|
715
|
-
readonly cases: {
|
|
716
|
-
OperationFailure: typeof OperationFailure;
|
|
717
|
-
OperationSuccess: typeof OperationSuccess;
|
|
718
|
-
};
|
|
719
|
-
readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: OperationFailure | OperationSuccess) => value is Extract<OperationFailure, {
|
|
720
|
-
_tag: Keys;
|
|
721
|
-
}> | Extract<OperationSuccess, {
|
|
722
|
-
_tag: Keys;
|
|
723
|
-
}>;
|
|
724
|
-
readonly guards: {
|
|
725
|
-
OperationFailure: (u: unknown) => u is OperationFailure;
|
|
726
|
-
OperationSuccess: (u: unknown) => u is OperationSuccess;
|
|
727
|
-
};
|
|
728
|
-
readonly match: {
|
|
729
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(value: OperationFailure | OperationSuccess, cases: Cases): Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
730
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(cases: Cases): (value: OperationFailure | OperationSuccess) => Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
731
|
-
};
|
|
732
|
-
} & {
|
|
733
|
-
readonly tags: import("effect/Schema").Literals<["OperationSuccess", "OperationFailure"]>;
|
|
734
|
-
readonly generateGuards: <K extends string>(property: K) => {
|
|
735
|
-
readonly isOperationFailure: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationFailure; };
|
|
736
|
-
readonly isOperationSuccess: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationSuccess; };
|
|
737
|
-
} & {
|
|
738
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: Extract<OperationFailure, {
|
|
739
|
-
readonly _tag: Tags[number];
|
|
740
|
-
}> | Extract<OperationSuccess, {
|
|
741
|
-
readonly _tag: Tags[number];
|
|
742
|
-
}>; };
|
|
743
|
-
};
|
|
744
|
-
readonly generateGuardsFor: <A_1>() => <K extends { [K_1 in keyof A_1 & string]: A_1[K_1] extends OperationFailure | OperationSuccess ? K_1 : never; }[keyof A_1 & string]>(property: K) => {
|
|
745
|
-
readonly isOperationFailure: (target: A_1) => target is A_1 & { readonly [P in K]: OperationFailure; };
|
|
746
|
-
readonly isOperationSuccess: (target: A_1) => target is A_1 & { readonly [P in K]: OperationSuccess; };
|
|
747
|
-
} & {
|
|
748
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => (target: A_1) => target is A_1 & { readonly [P in K]: Extract<OperationFailure, {
|
|
749
|
-
readonly _tag: Tags[number];
|
|
750
|
-
}> | Extract<OperationSuccess, {
|
|
751
|
-
readonly _tag: Tags[number];
|
|
752
|
-
}>; };
|
|
753
|
-
};
|
|
754
|
-
}>;
|
|
755
|
-
readonly createdAt: S.withConstructorDefault<S.DateFromString>;
|
|
756
|
-
readonly updatedAt: S.withConstructorDefault<import("effect/Schema").NullOr<S.DateFromString & {
|
|
757
|
-
withDefault: S.withConstructorDefault<S.DateFromString>;
|
|
758
|
-
withDecodingDefaultType: S.withDecodingDefaultType<S.DateFromString>;
|
|
759
|
-
}>>;
|
|
760
|
-
}>)]?: U[K]; }): { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
761
|
-
<A extends InstanceType<new (_: any) => {
|
|
762
|
-
readonly createdAt: Date;
|
|
763
|
-
readonly id: S.StringId;
|
|
764
|
-
readonly progress?: OperationProgress | undefined;
|
|
765
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
766
|
-
readonly title: S.NonEmptyString2k;
|
|
767
|
-
readonly updatedAt: Date | null;
|
|
768
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
769
|
-
readonly createdAt: Date;
|
|
770
|
-
readonly id: S.StringId;
|
|
771
|
-
readonly progress?: OperationProgress | undefined;
|
|
772
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
773
|
-
readonly title: S.NonEmptyString2k;
|
|
774
|
-
readonly updatedAt: Date | null;
|
|
775
|
-
}>>>(self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A, updates: { [K in keyof U & ("createdAt" | "id" | "title" | "updatedAt" | import("effect/Schema").Struct.TypeOptionalKeys<{
|
|
776
|
-
readonly id: S.WithDefaults<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
777
|
-
readonly Type: S.StringId;
|
|
778
|
-
readonly Iso: S.StringId;
|
|
779
|
-
readonly "~type.make": S.StringId;
|
|
780
|
-
} & {
|
|
781
|
-
make: () => S.StringId;
|
|
782
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
783
|
-
readonly Type: S.StringId;
|
|
784
|
-
readonly Iso: S.StringId;
|
|
785
|
-
readonly "~type.make": S.StringId;
|
|
786
|
-
}>;
|
|
787
|
-
}> & Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
788
|
-
readonly Type: S.StringId;
|
|
789
|
-
readonly Iso: S.StringId;
|
|
790
|
-
readonly "~type.make": S.StringId;
|
|
791
|
-
} & {
|
|
792
|
-
make: () => S.StringId;
|
|
793
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
794
|
-
readonly Type: S.StringId;
|
|
795
|
-
readonly Iso: S.StringId;
|
|
796
|
-
readonly "~type.make": S.StringId;
|
|
797
|
-
}>;
|
|
798
|
-
};
|
|
799
|
-
readonly title: S.WithDefaults<Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
800
|
-
readonly Type: S.NonEmptyString2k;
|
|
801
|
-
readonly Iso: S.NonEmptyString2k;
|
|
802
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
803
|
-
}> & Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
804
|
-
readonly Type: S.NonEmptyString2k;
|
|
805
|
-
readonly Iso: S.NonEmptyString2k;
|
|
806
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
807
|
-
};
|
|
808
|
-
readonly progress: S.optional<typeof OperationProgress>;
|
|
809
|
-
readonly result: S.optional<S.Union<[typeof OperationSuccess, typeof OperationFailure]> & {
|
|
810
|
-
readonly cases: {
|
|
811
|
-
OperationFailure: typeof OperationFailure;
|
|
812
|
-
OperationSuccess: typeof OperationSuccess;
|
|
813
|
-
};
|
|
814
|
-
readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: OperationFailure | OperationSuccess) => value is Extract<OperationFailure, {
|
|
815
|
-
_tag: Keys;
|
|
816
|
-
}> | Extract<OperationSuccess, {
|
|
817
|
-
_tag: Keys;
|
|
818
|
-
}>;
|
|
819
|
-
readonly guards: {
|
|
820
|
-
OperationFailure: (u: unknown) => u is OperationFailure;
|
|
821
|
-
OperationSuccess: (u: unknown) => u is OperationSuccess;
|
|
822
|
-
};
|
|
823
|
-
readonly match: {
|
|
824
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(value: OperationFailure | OperationSuccess, cases: Cases): Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
825
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(cases: Cases): (value: OperationFailure | OperationSuccess) => Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
826
|
-
};
|
|
827
|
-
} & {
|
|
828
|
-
readonly tags: import("effect/Schema").Literals<["OperationSuccess", "OperationFailure"]>;
|
|
829
|
-
readonly generateGuards: <K extends string>(property: K) => {
|
|
830
|
-
readonly isOperationFailure: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationFailure; };
|
|
831
|
-
readonly isOperationSuccess: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationSuccess; };
|
|
832
|
-
} & {
|
|
833
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: Extract<OperationFailure, {
|
|
834
|
-
readonly _tag: Tags[number];
|
|
835
|
-
}> | Extract<OperationSuccess, {
|
|
836
|
-
readonly _tag: Tags[number];
|
|
837
|
-
}>; };
|
|
838
|
-
};
|
|
839
|
-
readonly generateGuardsFor: <A_1>() => <K extends { [K_1 in keyof A_1 & string]: A_1[K_1] extends OperationFailure | OperationSuccess ? K_1 : never; }[keyof A_1 & string]>(property: K) => {
|
|
840
|
-
readonly isOperationFailure: (target: A_1) => target is A_1 & { readonly [P in K]: OperationFailure; };
|
|
841
|
-
readonly isOperationSuccess: (target: A_1) => target is A_1 & { readonly [P in K]: OperationSuccess; };
|
|
842
|
-
} & {
|
|
843
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => (target: A_1) => target is A_1 & { readonly [P in K]: Extract<OperationFailure, {
|
|
844
|
-
readonly _tag: Tags[number];
|
|
845
|
-
}> | Extract<OperationSuccess, {
|
|
846
|
-
readonly _tag: Tags[number];
|
|
847
|
-
}>; };
|
|
848
|
-
};
|
|
849
|
-
}>;
|
|
850
|
-
readonly createdAt: S.withConstructorDefault<S.DateFromString>;
|
|
851
|
-
readonly updatedAt: S.withConstructorDefault<import("effect/Schema").NullOr<S.DateFromString & {
|
|
852
|
-
withDefault: S.withConstructorDefault<S.DateFromString>;
|
|
853
|
-
withDecodingDefaultType: S.withDecodingDefaultType<S.DateFromString>;
|
|
854
|
-
}>>;
|
|
855
|
-
}>)]?: U[K]; }): { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
856
|
-
};
|
|
857
|
-
}, "Encoded"> & {
|
|
409
|
+
}>, "Encoded"> & {
|
|
858
410
|
readonly Encoded: Operation.Encoded;
|
|
859
|
-
}, {}> & Omit<
|
|
411
|
+
}, {}> & Omit<S.Struct<{
|
|
860
412
|
readonly id: S.WithDefaults<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
861
413
|
readonly Type: S.StringId;
|
|
862
414
|
readonly Iso: S.StringId;
|
|
@@ -936,391 +488,7 @@ declare const Operation_base: import("effect/Schema").Opaque<Operation, Omit<imp
|
|
|
936
488
|
withDefault: S.withConstructorDefault<S.DateFromString>;
|
|
937
489
|
withDecodingDefaultType: S.withDecodingDefaultType<S.DateFromString>;
|
|
938
490
|
}>>;
|
|
939
|
-
}
|
|
940
|
-
readonly copy: {
|
|
941
|
-
<A extends InstanceType<new (_: any) => {
|
|
942
|
-
readonly createdAt: Date;
|
|
943
|
-
readonly id: S.StringId;
|
|
944
|
-
readonly progress?: OperationProgress | undefined;
|
|
945
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
946
|
-
readonly title: S.NonEmptyString2k;
|
|
947
|
-
readonly updatedAt: Date | null;
|
|
948
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
949
|
-
readonly createdAt: Date;
|
|
950
|
-
readonly id: S.StringId;
|
|
951
|
-
readonly progress?: OperationProgress | undefined;
|
|
952
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
953
|
-
readonly title: S.NonEmptyString2k;
|
|
954
|
-
readonly updatedAt: Date | null;
|
|
955
|
-
}>>>(f: (a: A) => { [K in keyof U & ("createdAt" | "id" | "title" | "updatedAt" | import("effect/Schema").Struct.TypeOptionalKeys<{
|
|
956
|
-
readonly id: S.WithDefaults<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
957
|
-
readonly Type: S.StringId;
|
|
958
|
-
readonly Iso: S.StringId;
|
|
959
|
-
readonly "~type.make": S.StringId;
|
|
960
|
-
} & {
|
|
961
|
-
make: () => S.StringId;
|
|
962
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
963
|
-
readonly Type: S.StringId;
|
|
964
|
-
readonly Iso: S.StringId;
|
|
965
|
-
readonly "~type.make": S.StringId;
|
|
966
|
-
}>;
|
|
967
|
-
}> & Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
968
|
-
readonly Type: S.StringId;
|
|
969
|
-
readonly Iso: S.StringId;
|
|
970
|
-
readonly "~type.make": S.StringId;
|
|
971
|
-
} & {
|
|
972
|
-
make: () => S.StringId;
|
|
973
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
974
|
-
readonly Type: S.StringId;
|
|
975
|
-
readonly Iso: S.StringId;
|
|
976
|
-
readonly "~type.make": S.StringId;
|
|
977
|
-
}>;
|
|
978
|
-
};
|
|
979
|
-
readonly title: S.WithDefaults<Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
980
|
-
readonly Type: S.NonEmptyString2k;
|
|
981
|
-
readonly Iso: S.NonEmptyString2k;
|
|
982
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
983
|
-
}> & Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
984
|
-
readonly Type: S.NonEmptyString2k;
|
|
985
|
-
readonly Iso: S.NonEmptyString2k;
|
|
986
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
987
|
-
};
|
|
988
|
-
readonly progress: S.optional<typeof OperationProgress>;
|
|
989
|
-
readonly result: S.optional<S.Union<[typeof OperationSuccess, typeof OperationFailure]> & {
|
|
990
|
-
readonly cases: {
|
|
991
|
-
OperationFailure: typeof OperationFailure;
|
|
992
|
-
OperationSuccess: typeof OperationSuccess;
|
|
993
|
-
};
|
|
994
|
-
readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: OperationFailure | OperationSuccess) => value is Extract<OperationFailure, {
|
|
995
|
-
_tag: Keys;
|
|
996
|
-
}> | Extract<OperationSuccess, {
|
|
997
|
-
_tag: Keys;
|
|
998
|
-
}>;
|
|
999
|
-
readonly guards: {
|
|
1000
|
-
OperationFailure: (u: unknown) => u is OperationFailure;
|
|
1001
|
-
OperationSuccess: (u: unknown) => u is OperationSuccess;
|
|
1002
|
-
};
|
|
1003
|
-
readonly match: {
|
|
1004
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(value: OperationFailure | OperationSuccess, cases: Cases): Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
1005
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(cases: Cases): (value: OperationFailure | OperationSuccess) => Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
1006
|
-
};
|
|
1007
|
-
} & {
|
|
1008
|
-
readonly tags: import("effect/Schema").Literals<["OperationSuccess", "OperationFailure"]>;
|
|
1009
|
-
readonly generateGuards: <K extends string>(property: K) => {
|
|
1010
|
-
readonly isOperationFailure: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationFailure; };
|
|
1011
|
-
readonly isOperationSuccess: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationSuccess; };
|
|
1012
|
-
} & {
|
|
1013
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: Extract<OperationFailure, {
|
|
1014
|
-
readonly _tag: Tags[number];
|
|
1015
|
-
}> | Extract<OperationSuccess, {
|
|
1016
|
-
readonly _tag: Tags[number];
|
|
1017
|
-
}>; };
|
|
1018
|
-
};
|
|
1019
|
-
readonly generateGuardsFor: <A_1>() => <K extends { [K_1 in keyof A_1 & string]: A_1[K_1] extends OperationFailure | OperationSuccess ? K_1 : never; }[keyof A_1 & string]>(property: K) => {
|
|
1020
|
-
readonly isOperationFailure: (target: A_1) => target is A_1 & { readonly [P in K]: OperationFailure; };
|
|
1021
|
-
readonly isOperationSuccess: (target: A_1) => target is A_1 & { readonly [P in K]: OperationSuccess; };
|
|
1022
|
-
} & {
|
|
1023
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => (target: A_1) => target is A_1 & { readonly [P in K]: Extract<OperationFailure, {
|
|
1024
|
-
readonly _tag: Tags[number];
|
|
1025
|
-
}> | Extract<OperationSuccess, {
|
|
1026
|
-
readonly _tag: Tags[number];
|
|
1027
|
-
}>; };
|
|
1028
|
-
};
|
|
1029
|
-
}>;
|
|
1030
|
-
readonly createdAt: S.withConstructorDefault<S.DateFromString>;
|
|
1031
|
-
readonly updatedAt: S.withConstructorDefault<import("effect/Schema").NullOr<S.DateFromString & {
|
|
1032
|
-
withDefault: S.withConstructorDefault<S.DateFromString>;
|
|
1033
|
-
withDecodingDefaultType: S.withDecodingDefaultType<S.DateFromString>;
|
|
1034
|
-
}>>;
|
|
1035
|
-
}>)]?: U[K]; }): (self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A) => { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
1036
|
-
<A extends InstanceType<new (_: any) => {
|
|
1037
|
-
readonly createdAt: Date;
|
|
1038
|
-
readonly id: S.StringId;
|
|
1039
|
-
readonly progress?: OperationProgress | undefined;
|
|
1040
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
1041
|
-
readonly title: S.NonEmptyString2k;
|
|
1042
|
-
readonly updatedAt: Date | null;
|
|
1043
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
1044
|
-
readonly createdAt: Date;
|
|
1045
|
-
readonly id: S.StringId;
|
|
1046
|
-
readonly progress?: OperationProgress | undefined;
|
|
1047
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
1048
|
-
readonly title: S.NonEmptyString2k;
|
|
1049
|
-
readonly updatedAt: Date | null;
|
|
1050
|
-
}>>>(updates: { [K in keyof U & ("createdAt" | "id" | "title" | "updatedAt" | import("effect/Schema").Struct.TypeOptionalKeys<{
|
|
1051
|
-
readonly id: S.WithDefaults<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
1052
|
-
readonly Type: S.StringId;
|
|
1053
|
-
readonly Iso: S.StringId;
|
|
1054
|
-
readonly "~type.make": S.StringId;
|
|
1055
|
-
} & {
|
|
1056
|
-
make: () => S.StringId;
|
|
1057
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
1058
|
-
readonly Type: S.StringId;
|
|
1059
|
-
readonly Iso: S.StringId;
|
|
1060
|
-
readonly "~type.make": S.StringId;
|
|
1061
|
-
}>;
|
|
1062
|
-
}> & Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
1063
|
-
readonly Type: S.StringId;
|
|
1064
|
-
readonly Iso: S.StringId;
|
|
1065
|
-
readonly "~type.make": S.StringId;
|
|
1066
|
-
} & {
|
|
1067
|
-
make: () => S.StringId;
|
|
1068
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
1069
|
-
readonly Type: S.StringId;
|
|
1070
|
-
readonly Iso: S.StringId;
|
|
1071
|
-
readonly "~type.make": S.StringId;
|
|
1072
|
-
}>;
|
|
1073
|
-
};
|
|
1074
|
-
readonly title: S.WithDefaults<Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
1075
|
-
readonly Type: S.NonEmptyString2k;
|
|
1076
|
-
readonly Iso: S.NonEmptyString2k;
|
|
1077
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
1078
|
-
}> & Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
1079
|
-
readonly Type: S.NonEmptyString2k;
|
|
1080
|
-
readonly Iso: S.NonEmptyString2k;
|
|
1081
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
1082
|
-
};
|
|
1083
|
-
readonly progress: S.optional<typeof OperationProgress>;
|
|
1084
|
-
readonly result: S.optional<S.Union<[typeof OperationSuccess, typeof OperationFailure]> & {
|
|
1085
|
-
readonly cases: {
|
|
1086
|
-
OperationFailure: typeof OperationFailure;
|
|
1087
|
-
OperationSuccess: typeof OperationSuccess;
|
|
1088
|
-
};
|
|
1089
|
-
readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: OperationFailure | OperationSuccess) => value is Extract<OperationFailure, {
|
|
1090
|
-
_tag: Keys;
|
|
1091
|
-
}> | Extract<OperationSuccess, {
|
|
1092
|
-
_tag: Keys;
|
|
1093
|
-
}>;
|
|
1094
|
-
readonly guards: {
|
|
1095
|
-
OperationFailure: (u: unknown) => u is OperationFailure;
|
|
1096
|
-
OperationSuccess: (u: unknown) => u is OperationSuccess;
|
|
1097
|
-
};
|
|
1098
|
-
readonly match: {
|
|
1099
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(value: OperationFailure | OperationSuccess, cases: Cases): Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
1100
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(cases: Cases): (value: OperationFailure | OperationSuccess) => Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
1101
|
-
};
|
|
1102
|
-
} & {
|
|
1103
|
-
readonly tags: import("effect/Schema").Literals<["OperationSuccess", "OperationFailure"]>;
|
|
1104
|
-
readonly generateGuards: <K extends string>(property: K) => {
|
|
1105
|
-
readonly isOperationFailure: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationFailure; };
|
|
1106
|
-
readonly isOperationSuccess: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationSuccess; };
|
|
1107
|
-
} & {
|
|
1108
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: Extract<OperationFailure, {
|
|
1109
|
-
readonly _tag: Tags[number];
|
|
1110
|
-
}> | Extract<OperationSuccess, {
|
|
1111
|
-
readonly _tag: Tags[number];
|
|
1112
|
-
}>; };
|
|
1113
|
-
};
|
|
1114
|
-
readonly generateGuardsFor: <A_1>() => <K extends { [K_1 in keyof A_1 & string]: A_1[K_1] extends OperationFailure | OperationSuccess ? K_1 : never; }[keyof A_1 & string]>(property: K) => {
|
|
1115
|
-
readonly isOperationFailure: (target: A_1) => target is A_1 & { readonly [P in K]: OperationFailure; };
|
|
1116
|
-
readonly isOperationSuccess: (target: A_1) => target is A_1 & { readonly [P in K]: OperationSuccess; };
|
|
1117
|
-
} & {
|
|
1118
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => (target: A_1) => target is A_1 & { readonly [P in K]: Extract<OperationFailure, {
|
|
1119
|
-
readonly _tag: Tags[number];
|
|
1120
|
-
}> | Extract<OperationSuccess, {
|
|
1121
|
-
readonly _tag: Tags[number];
|
|
1122
|
-
}>; };
|
|
1123
|
-
};
|
|
1124
|
-
}>;
|
|
1125
|
-
readonly createdAt: S.withConstructorDefault<S.DateFromString>;
|
|
1126
|
-
readonly updatedAt: S.withConstructorDefault<import("effect/Schema").NullOr<S.DateFromString & {
|
|
1127
|
-
withDefault: S.withConstructorDefault<S.DateFromString>;
|
|
1128
|
-
withDecodingDefaultType: S.withDecodingDefaultType<S.DateFromString>;
|
|
1129
|
-
}>>;
|
|
1130
|
-
}>)]?: U[K]; }): (self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A) => { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
1131
|
-
} & {
|
|
1132
|
-
<A extends InstanceType<new (_: any) => {
|
|
1133
|
-
readonly createdAt: Date;
|
|
1134
|
-
readonly id: S.StringId;
|
|
1135
|
-
readonly progress?: OperationProgress | undefined;
|
|
1136
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
1137
|
-
readonly title: S.NonEmptyString2k;
|
|
1138
|
-
readonly updatedAt: Date | null;
|
|
1139
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
1140
|
-
readonly createdAt: Date;
|
|
1141
|
-
readonly id: S.StringId;
|
|
1142
|
-
readonly progress?: OperationProgress | undefined;
|
|
1143
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
1144
|
-
readonly title: S.NonEmptyString2k;
|
|
1145
|
-
readonly updatedAt: Date | null;
|
|
1146
|
-
}>>>(self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A, f: (a: A) => { [K in keyof U & ("createdAt" | "id" | "title" | "updatedAt" | import("effect/Schema").Struct.TypeOptionalKeys<{
|
|
1147
|
-
readonly id: S.WithDefaults<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
1148
|
-
readonly Type: S.StringId;
|
|
1149
|
-
readonly Iso: S.StringId;
|
|
1150
|
-
readonly "~type.make": S.StringId;
|
|
1151
|
-
} & {
|
|
1152
|
-
make: () => S.StringId;
|
|
1153
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
1154
|
-
readonly Type: S.StringId;
|
|
1155
|
-
readonly Iso: S.StringId;
|
|
1156
|
-
readonly "~type.make": S.StringId;
|
|
1157
|
-
}>;
|
|
1158
|
-
}> & Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
1159
|
-
readonly Type: S.StringId;
|
|
1160
|
-
readonly Iso: S.StringId;
|
|
1161
|
-
readonly "~type.make": S.StringId;
|
|
1162
|
-
} & {
|
|
1163
|
-
make: () => S.StringId;
|
|
1164
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
1165
|
-
readonly Type: S.StringId;
|
|
1166
|
-
readonly Iso: S.StringId;
|
|
1167
|
-
readonly "~type.make": S.StringId;
|
|
1168
|
-
}>;
|
|
1169
|
-
};
|
|
1170
|
-
readonly title: S.WithDefaults<Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
1171
|
-
readonly Type: S.NonEmptyString2k;
|
|
1172
|
-
readonly Iso: S.NonEmptyString2k;
|
|
1173
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
1174
|
-
}> & Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
1175
|
-
readonly Type: S.NonEmptyString2k;
|
|
1176
|
-
readonly Iso: S.NonEmptyString2k;
|
|
1177
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
1178
|
-
};
|
|
1179
|
-
readonly progress: S.optional<typeof OperationProgress>;
|
|
1180
|
-
readonly result: S.optional<S.Union<[typeof OperationSuccess, typeof OperationFailure]> & {
|
|
1181
|
-
readonly cases: {
|
|
1182
|
-
OperationFailure: typeof OperationFailure;
|
|
1183
|
-
OperationSuccess: typeof OperationSuccess;
|
|
1184
|
-
};
|
|
1185
|
-
readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: OperationFailure | OperationSuccess) => value is Extract<OperationFailure, {
|
|
1186
|
-
_tag: Keys;
|
|
1187
|
-
}> | Extract<OperationSuccess, {
|
|
1188
|
-
_tag: Keys;
|
|
1189
|
-
}>;
|
|
1190
|
-
readonly guards: {
|
|
1191
|
-
OperationFailure: (u: unknown) => u is OperationFailure;
|
|
1192
|
-
OperationSuccess: (u: unknown) => u is OperationSuccess;
|
|
1193
|
-
};
|
|
1194
|
-
readonly match: {
|
|
1195
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(value: OperationFailure | OperationSuccess, cases: Cases): Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
1196
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(cases: Cases): (value: OperationFailure | OperationSuccess) => Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
1197
|
-
};
|
|
1198
|
-
} & {
|
|
1199
|
-
readonly tags: import("effect/Schema").Literals<["OperationSuccess", "OperationFailure"]>;
|
|
1200
|
-
readonly generateGuards: <K extends string>(property: K) => {
|
|
1201
|
-
readonly isOperationFailure: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationFailure; };
|
|
1202
|
-
readonly isOperationSuccess: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationSuccess; };
|
|
1203
|
-
} & {
|
|
1204
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: Extract<OperationFailure, {
|
|
1205
|
-
readonly _tag: Tags[number];
|
|
1206
|
-
}> | Extract<OperationSuccess, {
|
|
1207
|
-
readonly _tag: Tags[number];
|
|
1208
|
-
}>; };
|
|
1209
|
-
};
|
|
1210
|
-
readonly generateGuardsFor: <A_1>() => <K extends { [K_1 in keyof A_1 & string]: A_1[K_1] extends OperationFailure | OperationSuccess ? K_1 : never; }[keyof A_1 & string]>(property: K) => {
|
|
1211
|
-
readonly isOperationFailure: (target: A_1) => target is A_1 & { readonly [P in K]: OperationFailure; };
|
|
1212
|
-
readonly isOperationSuccess: (target: A_1) => target is A_1 & { readonly [P in K]: OperationSuccess; };
|
|
1213
|
-
} & {
|
|
1214
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => (target: A_1) => target is A_1 & { readonly [P in K]: Extract<OperationFailure, {
|
|
1215
|
-
readonly _tag: Tags[number];
|
|
1216
|
-
}> | Extract<OperationSuccess, {
|
|
1217
|
-
readonly _tag: Tags[number];
|
|
1218
|
-
}>; };
|
|
1219
|
-
};
|
|
1220
|
-
}>;
|
|
1221
|
-
readonly createdAt: S.withConstructorDefault<S.DateFromString>;
|
|
1222
|
-
readonly updatedAt: S.withConstructorDefault<import("effect/Schema").NullOr<S.DateFromString & {
|
|
1223
|
-
withDefault: S.withConstructorDefault<S.DateFromString>;
|
|
1224
|
-
withDecodingDefaultType: S.withDecodingDefaultType<S.DateFromString>;
|
|
1225
|
-
}>>;
|
|
1226
|
-
}>)]?: U[K]; }): { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
1227
|
-
<A extends InstanceType<new (_: any) => {
|
|
1228
|
-
readonly createdAt: Date;
|
|
1229
|
-
readonly id: S.StringId;
|
|
1230
|
-
readonly progress?: OperationProgress | undefined;
|
|
1231
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
1232
|
-
readonly title: S.NonEmptyString2k;
|
|
1233
|
-
readonly updatedAt: Date | null;
|
|
1234
|
-
}>, U extends Partial<InstanceType<new (_: any) => {
|
|
1235
|
-
readonly createdAt: Date;
|
|
1236
|
-
readonly id: S.StringId;
|
|
1237
|
-
readonly progress?: OperationProgress | undefined;
|
|
1238
|
-
readonly result?: OperationFailure | OperationSuccess | undefined;
|
|
1239
|
-
readonly title: S.NonEmptyString2k;
|
|
1240
|
-
readonly updatedAt: Date | null;
|
|
1241
|
-
}>>>(self: import("effect/Types").Equals<{}, U> extends true ? import("effect/Types").Equals<never, keyof U> extends true ? "updates argument is empty or contains only extra properties" : A : A, updates: { [K in keyof U & ("createdAt" | "id" | "title" | "updatedAt" | import("effect/Schema").Struct.TypeOptionalKeys<{
|
|
1242
|
-
readonly id: S.WithDefaults<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
1243
|
-
readonly Type: S.StringId;
|
|
1244
|
-
readonly Iso: S.StringId;
|
|
1245
|
-
readonly "~type.make": S.StringId;
|
|
1246
|
-
} & {
|
|
1247
|
-
make: () => S.StringId;
|
|
1248
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
1249
|
-
readonly Type: S.StringId;
|
|
1250
|
-
readonly Iso: S.StringId;
|
|
1251
|
-
readonly "~type.make": S.StringId;
|
|
1252
|
-
}>;
|
|
1253
|
-
}> & Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
1254
|
-
readonly Type: S.StringId;
|
|
1255
|
-
readonly Iso: S.StringId;
|
|
1256
|
-
readonly "~type.make": S.StringId;
|
|
1257
|
-
} & {
|
|
1258
|
-
make: () => S.StringId;
|
|
1259
|
-
withDefault: S.withConstructorDefault<Omit<S.brand<S.String, "NonEmptyString" | "NonEmptyString100" | "NonEmptyString255" | "NonEmptyString2k" | "NonEmptyString50" | "NonEmptyString64" | "NonEmptyString64k" | "NonEmptyString80" | "StringId">, "Iso" | "Type" | "~type.make"> & {
|
|
1260
|
-
readonly Type: S.StringId;
|
|
1261
|
-
readonly Iso: S.StringId;
|
|
1262
|
-
readonly "~type.make": S.StringId;
|
|
1263
|
-
}>;
|
|
1264
|
-
};
|
|
1265
|
-
readonly title: S.WithDefaults<Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
1266
|
-
readonly Type: S.NonEmptyString2k;
|
|
1267
|
-
readonly Iso: S.NonEmptyString2k;
|
|
1268
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
1269
|
-
}> & Omit<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString2k" | "NonEmptyString64k">, "Iso" | "Type" | "~type.make"> & {
|
|
1270
|
-
readonly Type: S.NonEmptyString2k;
|
|
1271
|
-
readonly Iso: S.NonEmptyString2k;
|
|
1272
|
-
readonly "~type.make": S.NonEmptyString2k;
|
|
1273
|
-
};
|
|
1274
|
-
readonly progress: S.optional<typeof OperationProgress>;
|
|
1275
|
-
readonly result: S.optional<S.Union<[typeof OperationSuccess, typeof OperationFailure]> & {
|
|
1276
|
-
readonly cases: {
|
|
1277
|
-
OperationFailure: typeof OperationFailure;
|
|
1278
|
-
OperationSuccess: typeof OperationSuccess;
|
|
1279
|
-
};
|
|
1280
|
-
readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: OperationFailure | OperationSuccess) => value is Extract<OperationFailure, {
|
|
1281
|
-
_tag: Keys;
|
|
1282
|
-
}> | Extract<OperationSuccess, {
|
|
1283
|
-
_tag: Keys;
|
|
1284
|
-
}>;
|
|
1285
|
-
readonly guards: {
|
|
1286
|
-
OperationFailure: (u: unknown) => u is OperationFailure;
|
|
1287
|
-
OperationSuccess: (u: unknown) => u is OperationSuccess;
|
|
1288
|
-
};
|
|
1289
|
-
readonly match: {
|
|
1290
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(value: OperationFailure | OperationSuccess, cases: Cases): Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
1291
|
-
<Cases extends { [M in typeof OperationSuccess | typeof OperationFailure as M["Type"]["_tag"]]: (value: M["Type"]) => any; }>(cases: Cases): (value: OperationFailure | OperationSuccess) => Cases[keyof Cases] extends (value: any) => infer R ? import("effect/Unify").Unify<R> : never;
|
|
1292
|
-
};
|
|
1293
|
-
} & {
|
|
1294
|
-
readonly tags: import("effect/Schema").Literals<["OperationSuccess", "OperationFailure"]>;
|
|
1295
|
-
readonly generateGuards: <K extends string>(property: K) => {
|
|
1296
|
-
readonly isOperationFailure: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationFailure; };
|
|
1297
|
-
readonly isOperationSuccess: <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: OperationSuccess; };
|
|
1298
|
-
} & {
|
|
1299
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => <T extends { readonly [P in K]: OperationFailure | OperationSuccess; }>(target: T) => target is T & { readonly [P in K]: Extract<OperationFailure, {
|
|
1300
|
-
readonly _tag: Tags[number];
|
|
1301
|
-
}> | Extract<OperationSuccess, {
|
|
1302
|
-
readonly _tag: Tags[number];
|
|
1303
|
-
}>; };
|
|
1304
|
-
};
|
|
1305
|
-
readonly generateGuardsFor: <A_1>() => <K extends { [K_1 in keyof A_1 & string]: A_1[K_1] extends OperationFailure | OperationSuccess ? K_1 : never; }[keyof A_1 & string]>(property: K) => {
|
|
1306
|
-
readonly isOperationFailure: (target: A_1) => target is A_1 & { readonly [P in K]: OperationFailure; };
|
|
1307
|
-
readonly isOperationSuccess: (target: A_1) => target is A_1 & { readonly [P in K]: OperationSuccess; };
|
|
1308
|
-
} & {
|
|
1309
|
-
readonly isAnyOf: <const Tags extends ReadonlyArray<"OperationFailure" | "OperationSuccess">>(tags: Tags) => (target: A_1) => target is A_1 & { readonly [P in K]: Extract<OperationFailure, {
|
|
1310
|
-
readonly _tag: Tags[number];
|
|
1311
|
-
}> | Extract<OperationSuccess, {
|
|
1312
|
-
readonly _tag: Tags[number];
|
|
1313
|
-
}>; };
|
|
1314
|
-
};
|
|
1315
|
-
}>;
|
|
1316
|
-
readonly createdAt: S.withConstructorDefault<S.DateFromString>;
|
|
1317
|
-
readonly updatedAt: S.withConstructorDefault<import("effect/Schema").NullOr<S.DateFromString & {
|
|
1318
|
-
withDefault: S.withConstructorDefault<S.DateFromString>;
|
|
1319
|
-
withDecodingDefaultType: S.withDecodingDefaultType<S.DateFromString>;
|
|
1320
|
-
}>>;
|
|
1321
|
-
}>)]?: U[K]; }): { [K in keyof A | keyof U]: K extends keyof U ? U[K] : A[K & keyof A]; };
|
|
1322
|
-
};
|
|
1323
|
-
}, keyof S.Top>;
|
|
491
|
+
}>, keyof S.Top>;
|
|
1324
492
|
export declare class Operation extends Operation_base {
|
|
1325
493
|
}
|
|
1326
494
|
export declare namespace OperationProgress {
|
|
@@ -1340,4 +508,4 @@ export declare namespace Operation {
|
|
|
1340
508
|
}
|
|
1341
509
|
}
|
|
1342
510
|
export {};
|
|
1343
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
511
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT3BlcmF0aW9ucy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL09wZXJhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLENBQUMsTUFBTSxhQUFhLENBQUE7QUFFaEMsTUFBTSxNQUFNLFdBQVcsR0FBRyxDQUFDLENBQUMsUUFBUSxDQUFBO0FBQ3BDLGVBQU8sTUFBTSxXQUFXOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0NBQWEsQ0FBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVyQyxxQkFBYSxpQkFBa0IsU0FBUSxzQkFNcEM7Q0FBRzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVOLHFCQUFhLGdCQUNYLFNBQVEscUJBRUw7Q0FDSDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVGLHFCQUFhLGdCQUNYLFNBQVEscUJBRUw7Q0FDSDtBQUVGLGVBQU8sTUFBTSxlQUFlOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0NBQW9ELENBQUE7QUFDaEYsTUFBTSxNQUFNLGVBQWUsR0FBRyxDQUFDLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLGVBQWUsQ0FBQyxDQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVuRSxxQkFBYSxTQUFVLFNBQVEsY0FPNUI7Q0FBRztBQUtOLHlCQUFpQixpQkFBaUIsQ0FBQyxDQUFDO0lBQ2xDLFVBQWlCLE9BQVEsU0FBUSxDQUFDLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFBLE9BQU8saUJBQWlCLEVBQUMsUUFBUSxDQUFDLENBQUM7S0FBRztDQUN6RjtBQUNELHlCQUFpQixnQkFBZ0IsQ0FBQyxDQUFDO0lBQ2pDLFVBQWlCLE9BQVEsU0FBUSxDQUFDLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFBLE9BQU8sZ0JBQWdCLEVBQUMsUUFBUSxDQUFDLENBQUM7S0FBRztDQUN4RjtBQUNELHlCQUFpQixnQkFBZ0IsQ0FBQyxDQUFDO0lBQ2pDLFVBQWlCLE9BQVEsU0FBUSxDQUFDLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFBLE9BQU8sZ0JBQWdCLEVBQUMsUUFBUSxDQUFDLENBQUM7S0FBRztDQUN4RjtBQUNELHlCQUFpQixTQUFTLENBQUMsQ0FBQztJQUMxQixVQUFpQixPQUFRLFNBQVEsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQSxPQUFPLFNBQVMsRUFBQyxRQUFRLENBQUMsQ0FBQztLQUFHO0NBQ2pGIn0=
|