effect 4.0.0-beta.46 → 4.0.0-beta.47
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/dist/Schema.d.ts +223 -140
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +110 -32
- package/dist/Schema.js.map +1 -1
- package/dist/Types.d.ts +9 -0
- package/dist/Types.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +1 -1
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +7 -7
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +1 -1
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Schema.ts +260 -167
- package/src/Types.ts +8 -0
- package/src/unstable/ai/McpSchema.ts +1 -1
- package/src/unstable/httpapi/HttpApiSchema.ts +4 -6
- package/src/unstable/rpc/RpcSchema.ts +1 -1
- package/src/unstable/workers/Transferable.ts +2 -2
package/dist/Schema.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ import type * as SchemaRepresentation from "./SchemaRepresentation.ts";
|
|
|
116
116
|
import type { Assign, Lambda, Mutable, Simplify } from "./Struct.ts";
|
|
117
117
|
import * as Struct_ from "./Struct.ts";
|
|
118
118
|
import * as FastCheck from "./testing/FastCheck.ts";
|
|
119
|
-
import type { UnionToIntersection } from "./Types.ts";
|
|
119
|
+
import type { RequiredKeys, UnionToIntersection } from "./Types.ts";
|
|
120
120
|
import type { Unify } from "./Unify.ts";
|
|
121
121
|
declare const TypeId = "~effect/Schema/Schema";
|
|
122
122
|
/**
|
|
@@ -184,10 +184,10 @@ export interface MakeOptions {
|
|
|
184
184
|
*
|
|
185
185
|
* @since 4.0.0
|
|
186
186
|
*/
|
|
187
|
-
export interface Bottom<out T, out E, out RD, out RE, out Ast extends AST.AST, out
|
|
187
|
+
export interface Bottom<out T, out E, out RD, out RE, out Ast extends AST.AST, out Rebuild extends Top, out TypeMakeIn = T, out Iso = T, in out TypeParameters extends ReadonlyArray<Top> = readonly [], out TypeMake = TypeMakeIn, out TypeMutability extends Mutability = "readonly", out TypeOptionality extends Optionality = "required", out TypeConstructorDefault extends ConstructorDefault = "no-default", out EncodedMutability extends Mutability = "readonly", out EncodedOptionality extends Optionality = "required"> extends Pipeable.Pipeable {
|
|
188
188
|
readonly [TypeId]: typeof TypeId;
|
|
189
|
-
readonly ast: Ast;
|
|
190
|
-
readonly "
|
|
189
|
+
readonly "ast": Ast;
|
|
190
|
+
readonly "Rebuild": Rebuild;
|
|
191
191
|
readonly "~type.parameters": TypeParameters;
|
|
192
192
|
readonly "Type": T;
|
|
193
193
|
readonly "Encoded": E;
|
|
@@ -201,10 +201,10 @@ export interface Bottom<out T, out E, out RD, out RE, out Ast extends AST.AST, o
|
|
|
201
201
|
readonly "~type.optionality": TypeOptionality;
|
|
202
202
|
readonly "~encoded.mutability": EncodedMutability;
|
|
203
203
|
readonly "~encoded.optionality": EncodedOptionality;
|
|
204
|
-
annotate(annotations: Annotations.Bottom<this["Type"], this["~type.parameters"]>): this["
|
|
205
|
-
annotateKey(annotations: Annotations.Key<this["Type"]>): this["
|
|
206
|
-
check(...checks: readonly [AST.Check<this["Type"]>, ...Array<AST.Check<this["Type"]>>]): this["
|
|
207
|
-
rebuild(ast: this["ast"]): this["
|
|
204
|
+
annotate(annotations: Annotations.Bottom<this["Type"], this["~type.parameters"]>): this["Rebuild"];
|
|
205
|
+
annotateKey(annotations: Annotations.Key<this["Type"]>): this["Rebuild"];
|
|
206
|
+
check(...checks: readonly [AST.Check<this["Type"]>, ...Array<AST.Check<this["Type"]>>]): this["Rebuild"];
|
|
207
|
+
rebuild(ast: this["ast"]): this["Rebuild"];
|
|
208
208
|
/**
|
|
209
209
|
* @throws {Error} The issue is contained in the error cause.
|
|
210
210
|
*/
|
|
@@ -281,7 +281,7 @@ export declare function declareConstructor<T, E = T, Iso = T>(): <const TypePara
|
|
|
281
281
|
* @since 4.0.0
|
|
282
282
|
*/
|
|
283
283
|
export interface declare<T, Iso = T> extends declareConstructor<T, T, readonly [], Iso> {
|
|
284
|
-
readonly "
|
|
284
|
+
readonly "Rebuild": declare<T, Iso>;
|
|
285
285
|
}
|
|
286
286
|
/**
|
|
287
287
|
* Creates a schema for a **non-parametric** opaque type using a type-guard
|
|
@@ -332,14 +332,14 @@ export declare function declare<T, Iso = T>(is: (u: unknown) => u is T, annotati
|
|
|
332
332
|
* const bottom = Schema.revealBottom(schema)
|
|
333
333
|
*
|
|
334
334
|
* // `bottom` now exposes Type, Encoded, DecodingServices, EncodingServices,
|
|
335
|
-
* // ast,
|
|
335
|
+
* // ast, Rebuild, ~type.make.in, Iso, ~type.parameters, etc.
|
|
336
336
|
* type T = typeof bottom["Type"] // string
|
|
337
337
|
* type E = typeof bottom["Encoded"] // string
|
|
338
338
|
* ```
|
|
339
339
|
*
|
|
340
340
|
* @since 4.0.0
|
|
341
341
|
*/
|
|
342
|
-
export declare function revealBottom<S extends Top>(bottom: S): Bottom<S["Type"], S["Encoded"], S["DecodingServices"], S["EncodingServices"], S["ast"], S["
|
|
342
|
+
export declare function revealBottom<S extends Top>(bottom: S): Bottom<S["Type"], S["Encoded"], S["DecodingServices"], S["EncodingServices"], S["ast"], S["Rebuild"], S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]>;
|
|
343
343
|
/**
|
|
344
344
|
* Adds metadata annotations to a schema without changing its runtime behavior.
|
|
345
345
|
* This is the pipeable (curried) counterpart of the `.annotate` method.
|
|
@@ -361,10 +361,41 @@ export declare function revealBottom<S extends Top>(bottom: S): Bottom<S["Type"]
|
|
|
361
361
|
* )
|
|
362
362
|
* ```
|
|
363
363
|
*
|
|
364
|
+
* @see {@link annotateEncoded} to annotate the encoded side instead.
|
|
365
|
+
*
|
|
364
366
|
* @category Annotations
|
|
365
367
|
* @since 4.0.0
|
|
366
368
|
*/
|
|
367
|
-
export declare function annotate<S extends Top>(annotations: Annotations.Bottom<S["Type"], S["~type.parameters"]>): (self: S) => S["
|
|
369
|
+
export declare function annotate<S extends Top>(annotations: Annotations.Bottom<S["Type"], S["~type.parameters"]>): (self: S) => S["Rebuild"];
|
|
370
|
+
/**
|
|
371
|
+
* Adds metadata annotations to the **encoded** side of a schema without
|
|
372
|
+
* changing its runtime behavior. This is the encoded-side counterpart of
|
|
373
|
+
* `annotate`, which targets the decoded (Type) side.
|
|
374
|
+
*
|
|
375
|
+
* Internally the schema is flipped so that `Encoded` becomes `Type`,
|
|
376
|
+
* annotated, and then flipped back.
|
|
377
|
+
*
|
|
378
|
+
* **Example** (Adding a title to the encoded representation)
|
|
379
|
+
*
|
|
380
|
+
* ```ts
|
|
381
|
+
* import { Schema } from "effect"
|
|
382
|
+
*
|
|
383
|
+
* const schema = Schema.NumberFromString.pipe(
|
|
384
|
+
* Schema.annotateEncoded({
|
|
385
|
+
* title: "my title"
|
|
386
|
+
* })
|
|
387
|
+
* )
|
|
388
|
+
*
|
|
389
|
+
* console.log(Schema.toEncoded(schema).ast.annotations?.title)
|
|
390
|
+
* // "my title"
|
|
391
|
+
* ```
|
|
392
|
+
*
|
|
393
|
+
* @see {@link annotate} to annotate the type side instead.
|
|
394
|
+
*
|
|
395
|
+
* @category Annotations
|
|
396
|
+
* @since 4.0.0
|
|
397
|
+
*/
|
|
398
|
+
export declare function annotateEncoded<S extends Top>(annotations: Annotations.Bottom<S["Encoded"], readonly []>): (self: S) => S["Rebuild"];
|
|
368
399
|
/**
|
|
369
400
|
* Adds key-level annotations to a schema field. This is the pipeable
|
|
370
401
|
* (curried) counterpart of the `.annotateKey` method.
|
|
@@ -393,7 +424,7 @@ export declare function annotate<S extends Top>(annotations: Annotations.Bottom<
|
|
|
393
424
|
* @category Annotations
|
|
394
425
|
* @since 4.0.0
|
|
395
426
|
*/
|
|
396
|
-
export declare function annotateKey<S extends Top>(annotations: Annotations.Key<S["Type"]>): (self: S) => S["
|
|
427
|
+
export declare function annotateKey<S extends Top>(annotations: Annotations.Key<S["Type"]>): (self: S) => S["Rebuild"];
|
|
397
428
|
/**
|
|
398
429
|
* The existential "any schema" type — all type parameters are erased to `unknown`.
|
|
399
430
|
*
|
|
@@ -464,7 +495,7 @@ export declare namespace Schema {
|
|
|
464
495
|
*/
|
|
465
496
|
export interface Schema<out T> extends Top {
|
|
466
497
|
readonly "Type": T;
|
|
467
|
-
readonly "
|
|
498
|
+
readonly "Rebuild": Schema<T>;
|
|
468
499
|
}
|
|
469
500
|
/**
|
|
470
501
|
* Namespace of type-level helpers for {@link Codec}.
|
|
@@ -550,7 +581,7 @@ export interface Optic<out T, out Iso> extends Schema<T> {
|
|
|
550
581
|
readonly "Iso": Iso;
|
|
551
582
|
readonly "DecodingServices": never;
|
|
552
583
|
readonly "EncodingServices": never;
|
|
553
|
-
readonly "
|
|
584
|
+
readonly "Rebuild": Optic<T, Iso>;
|
|
554
585
|
}
|
|
555
586
|
/**
|
|
556
587
|
* A schema that tracks the decoded type `T`, the encoded type `E`, and the
|
|
@@ -586,7 +617,7 @@ export interface Codec<out T, out E = T, out RD = never, out RE = never> extends
|
|
|
586
617
|
readonly "Encoded": E;
|
|
587
618
|
readonly "DecodingServices": RD;
|
|
588
619
|
readonly "EncodingServices": RE;
|
|
589
|
-
readonly "
|
|
620
|
+
readonly "Rebuild": Codec<T, E, RD, RE>;
|
|
590
621
|
}
|
|
591
622
|
/**
|
|
592
623
|
* A {@link Codec} view for APIs that only *decode* (parse/validate) values.
|
|
@@ -609,7 +640,7 @@ export interface Codec<out T, out E = T, out RD = never, out RE = never> extends
|
|
|
609
640
|
* @since 4.0.0
|
|
610
641
|
*/
|
|
611
642
|
export interface Decoder<out T, out RD = never> extends Codec<T, unknown, RD, unknown> {
|
|
612
|
-
readonly "
|
|
643
|
+
readonly "Rebuild": Decoder<T, RD>;
|
|
613
644
|
}
|
|
614
645
|
/**
|
|
615
646
|
* A {@link Codec} view for APIs that only *encode* values.
|
|
@@ -632,7 +663,7 @@ export interface Decoder<out T, out RD = never> extends Codec<T, unknown, RD, un
|
|
|
632
663
|
* @since 4.0.0
|
|
633
664
|
*/
|
|
634
665
|
export interface Encoder<out E, out RE = never> extends Codec<unknown, E, unknown, RE> {
|
|
635
|
-
readonly "
|
|
666
|
+
readonly "Rebuild": Encoder<E, RE>;
|
|
636
667
|
}
|
|
637
668
|
/**
|
|
638
669
|
* Identity function that widens a value to the full {@link Codec} interface,
|
|
@@ -1202,7 +1233,7 @@ export declare const requiredKey: requiredKeyLambda;
|
|
|
1202
1233
|
* @since 4.0.0
|
|
1203
1234
|
*/
|
|
1204
1235
|
export interface optional<S extends Top> extends optionalKey<UndefinedOr<S>> {
|
|
1205
|
-
readonly "
|
|
1236
|
+
readonly "Rebuild": optional<S>;
|
|
1206
1237
|
}
|
|
1207
1238
|
interface optionalLambda extends Lambda {
|
|
1208
1239
|
<S extends Top>(self: S): optional<S>;
|
|
@@ -1341,7 +1372,7 @@ export interface flip<S extends Top> extends Bottom<S["Encoded"], S["Type"], S["
|
|
|
1341
1372
|
*
|
|
1342
1373
|
* @since 4.0.0
|
|
1343
1374
|
*/
|
|
1344
|
-
export declare function flip<S extends Top>(schema: S): S extends flip<infer F> ? F["
|
|
1375
|
+
export declare function flip<S extends Top>(schema: S): S extends flip<infer F> ? F["Rebuild"] : flip<S>;
|
|
1345
1376
|
/**
|
|
1346
1377
|
* Represents a schema for a single literal value.
|
|
1347
1378
|
*
|
|
@@ -2488,7 +2519,7 @@ export declare const NonEmptyArray: NonEmptyArrayLambda;
|
|
|
2488
2519
|
* @since 4.0.0
|
|
2489
2520
|
*/
|
|
2490
2521
|
export interface ArrayEnsure<S extends Top> extends decodeTo<$Array<toType<S>>, Union<readonly [S, $Array<S>]>> {
|
|
2491
|
-
readonly "
|
|
2522
|
+
readonly "Rebuild": ArrayEnsure<S>;
|
|
2492
2523
|
}
|
|
2493
2524
|
/**
|
|
2494
2525
|
* Decodes a single value or an array of values into an array.
|
|
@@ -2511,7 +2542,7 @@ export declare function ArrayEnsure<S extends Top>(schema: S): ArrayEnsure<S>;
|
|
|
2511
2542
|
* @since 4.0.0
|
|
2512
2543
|
*/
|
|
2513
2544
|
export interface UniqueArray<S extends Top> extends $Array<S> {
|
|
2514
|
-
readonly "
|
|
2545
|
+
readonly "Rebuild": UniqueArray<S>;
|
|
2515
2546
|
}
|
|
2516
2547
|
/**
|
|
2517
2548
|
* Returns a new array schema that ensures all elements are unique.
|
|
@@ -2667,7 +2698,7 @@ export declare function Literals<const L extends ReadonlyArray<AST.LiteralValue>
|
|
|
2667
2698
|
* @since 4.0.0
|
|
2668
2699
|
*/
|
|
2669
2700
|
export interface NullOr<S extends Top> extends Union<readonly [S, Null]> {
|
|
2670
|
-
readonly "
|
|
2701
|
+
readonly "Rebuild": NullOr<S>;
|
|
2671
2702
|
}
|
|
2672
2703
|
interface NullOrLambda extends Lambda {
|
|
2673
2704
|
<S extends Top>(self: S): NullOr<S>;
|
|
@@ -2686,7 +2717,7 @@ export declare const NullOr: NullOrLambda;
|
|
|
2686
2717
|
* @since 4.0.0
|
|
2687
2718
|
*/
|
|
2688
2719
|
export interface UndefinedOr<S extends Top> extends Union<readonly [S, Undefined]> {
|
|
2689
|
-
readonly "
|
|
2720
|
+
readonly "Rebuild": UndefinedOr<S>;
|
|
2690
2721
|
}
|
|
2691
2722
|
interface UndefinedOrLambda extends Lambda {
|
|
2692
2723
|
<S extends Top>(self: S): UndefinedOr<S>;
|
|
@@ -2704,7 +2735,7 @@ export declare const UndefinedOr: UndefinedOrLambda;
|
|
|
2704
2735
|
* @since 4.0.0
|
|
2705
2736
|
*/
|
|
2706
2737
|
export interface NullishOr<S extends Top> extends Union<readonly [S, Null, Undefined]> {
|
|
2707
|
-
readonly "
|
|
2738
|
+
readonly "Rebuild": NullishOr<S>;
|
|
2708
2739
|
}
|
|
2709
2740
|
interface NullishOrLambda extends Lambda {
|
|
2710
2741
|
<S extends Top>(self: S): NullishOr<S>;
|
|
@@ -2762,7 +2793,7 @@ export declare function suspend<S extends Top>(f: () => S): suspend<S>;
|
|
|
2762
2793
|
* @category Filtering
|
|
2763
2794
|
* @since 4.0.0
|
|
2764
2795
|
*/
|
|
2765
|
-
export declare function check<S extends Top>(...checks: readonly [AST.Check<S["Type"]>, ...Array<AST.Check<S["Type"]>>]): (self: S) => S["
|
|
2796
|
+
export declare function check<S extends Top>(...checks: readonly [AST.Check<S["Type"]>, ...Array<AST.Check<S["Type"]>>]): (self: S) => S["Rebuild"];
|
|
2766
2797
|
/**
|
|
2767
2798
|
* The output type of {@link refine}, narrowing the schema's `Type` to `T` via a
|
|
2768
2799
|
* type guard.
|
|
@@ -2798,7 +2829,7 @@ export interface brand<S extends Top, B> extends Bottom<S["Type"] & DistributeBr
|
|
|
2798
2829
|
* @category Branding
|
|
2799
2830
|
* @since 4.0.0
|
|
2800
2831
|
*/
|
|
2801
|
-
export declare function brand<B extends string>(identifier: B): <S extends Top>(schema: S) => brand<S["
|
|
2832
|
+
export declare function brand<B extends string>(identifier: B): <S extends Top>(schema: S) => brand<S["Rebuild"], B>;
|
|
2802
2833
|
/**
|
|
2803
2834
|
* Creates a branded schema from a {@link Brand.Constructor}, applying the
|
|
2804
2835
|
* constructor's checks and brand tag to the underlying schema.
|
|
@@ -2808,7 +2839,7 @@ export declare function brand<B extends string>(identifier: B): <S extends Top>(
|
|
|
2808
2839
|
*/
|
|
2809
2840
|
export declare function fromBrand<A extends Brand.Brand<any>>(identifier: string, ctor: Brand.Constructor<A>): <S extends Top & {
|
|
2810
2841
|
readonly "Type": Brand.Brand.Unbranded<A>;
|
|
2811
|
-
}>(self: S) => brand<S["
|
|
2842
|
+
}>(self: S) => brand<S["Rebuild"], Brand.Brand.Keys<A>>;
|
|
2812
2843
|
/**
|
|
2813
2844
|
* A schema that wraps another schema and intercepts its decoding pipeline.
|
|
2814
2845
|
*
|
|
@@ -2898,7 +2929,7 @@ export declare function middlewareEncoding<S extends Top, RE>(encode: (effect: E
|
|
|
2898
2929
|
* @see {@link catchDecodingWithContext} to add service requirements to the handler
|
|
2899
2930
|
* @since 4.0.0
|
|
2900
2931
|
*/
|
|
2901
|
-
export declare function catchDecoding<S extends Top>(f: (issue: Issue.Issue) => Effect.Effect<Option_.Option<S["Type"]>, Issue.Issue>): (self: S) => S["
|
|
2932
|
+
export declare function catchDecoding<S extends Top>(f: (issue: Issue.Issue) => Effect.Effect<Option_.Option<S["Type"]>, Issue.Issue>): (self: S) => S["Rebuild"];
|
|
2902
2933
|
/**
|
|
2903
2934
|
* Like {@link catchDecoding}, but the handler may require Effect services (`R`).
|
|
2904
2935
|
*
|
|
@@ -2914,7 +2945,7 @@ export declare function catchDecodingWithContext<S extends Top, R = never>(f: (i
|
|
|
2914
2945
|
* @see {@link catchEncodingWithContext} to add service requirements to the handler
|
|
2915
2946
|
* @since 4.0.0
|
|
2916
2947
|
*/
|
|
2917
|
-
export declare function catchEncoding<S extends Top>(f: (issue: Issue.Issue) => Effect.Effect<Option_.Option<S["Encoded"]>, Issue.Issue>): (self: S) => S["
|
|
2948
|
+
export declare function catchEncoding<S extends Top>(f: (issue: Issue.Issue) => Effect.Effect<Option_.Option<S["Encoded"]>, Issue.Issue>): (self: S) => S["Rebuild"];
|
|
2918
2949
|
/**
|
|
2919
2950
|
* Like {@link catchEncoding}, but the handler may require Effect services (`R`).
|
|
2920
2951
|
*
|
|
@@ -3131,13 +3162,14 @@ export interface withConstructorDefault<S extends Top & WithoutConstructorDefaul
|
|
|
3131
3162
|
*/
|
|
3132
3163
|
export declare function withConstructorDefault<S extends Top & WithoutConstructorDefault>(defaultValue: Effect.Effect<S["~type.make.in"]>): (schema: S) => withConstructorDefault<S>;
|
|
3133
3164
|
/**
|
|
3134
|
-
* The type produced by {@link withDecodingDefaultKey}
|
|
3165
|
+
* The type produced by {@link withDecodingDefaultKey}: a schema whose `Encoded`
|
|
3166
|
+
* side is `optionalKey` and that fills in a default `Encoded` value during decoding.
|
|
3135
3167
|
*
|
|
3136
3168
|
* @see {@link withDecodingDefaultKey} for the constructor
|
|
3137
3169
|
* @since 4.0.0
|
|
3138
3170
|
*/
|
|
3139
3171
|
export interface withDecodingDefaultKey<S extends Top> extends decodeTo<S, optionalKey<toEncoded<S>>> {
|
|
3140
|
-
readonly "
|
|
3172
|
+
readonly "Rebuild": withDecodingDefaultKey<S>;
|
|
3141
3173
|
}
|
|
3142
3174
|
/**
|
|
3143
3175
|
* Options for {@link withDecodingDefaultKey} and {@link withDecodingDefault}.
|
|
@@ -3152,18 +3184,18 @@ export type DecodingDefaultOptions = {
|
|
|
3152
3184
|
readonly encodingStrategy?: "omit" | "passthrough" | undefined;
|
|
3153
3185
|
};
|
|
3154
3186
|
/**
|
|
3155
|
-
*
|
|
3187
|
+
* Makes a struct key optional on the `Encoded` side and provides a default
|
|
3188
|
+
* `Encoded` value when the key is missing during decoding.
|
|
3156
3189
|
*
|
|
3157
|
-
*
|
|
3158
|
-
*
|
|
3159
|
-
*
|
|
3190
|
+
* The key uses `optionalKey` on the encoded side, so it may be absent from the
|
|
3191
|
+
* input object but **not** `undefined`. The default value is specified in terms
|
|
3192
|
+
* of the `Encoded` type (before any decoding transformations).
|
|
3160
3193
|
*
|
|
3161
|
-
*
|
|
3194
|
+
* **Options**
|
|
3162
3195
|
*
|
|
3163
|
-
*
|
|
3164
|
-
*
|
|
3165
|
-
*
|
|
3166
|
-
* - `"omit"`: omit the key from the output
|
|
3196
|
+
* - `encodingStrategy`:
|
|
3197
|
+
* - `"passthrough"` (default): include the value in the encoded output.
|
|
3198
|
+
* - `"omit"`: omit the key from the encoded output.
|
|
3167
3199
|
*
|
|
3168
3200
|
* **Example** (Default for a missing struct key)
|
|
3169
3201
|
*
|
|
@@ -3178,35 +3210,65 @@ export type DecodingDefaultOptions = {
|
|
|
3178
3210
|
* // result: { name: "anonymous" }
|
|
3179
3211
|
* ```
|
|
3180
3212
|
*
|
|
3181
|
-
* @see {@link withDecodingDefault} for the
|
|
3213
|
+
* @see {@link withDecodingDefault} for the value-level variant (key absent **or** `undefined`)
|
|
3214
|
+
* @see {@link withDecodingDefaultTypeKey} for the variant where the default is a `Type` value
|
|
3182
3215
|
* @since 4.0.0
|
|
3183
3216
|
*/
|
|
3184
3217
|
export declare function withDecodingDefaultKey<S extends Top>(defaultValue: Effect.Effect<S["Encoded"]>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefaultKey<S>;
|
|
3185
3218
|
/**
|
|
3186
|
-
* The type produced by {@link
|
|
3219
|
+
* The type produced by {@link withDecodingDefaultTypeKey}: a schema whose
|
|
3220
|
+
* `Encoded` side is `optionalKey` and that fills in a default `Type` value
|
|
3221
|
+
* during decoding.
|
|
3187
3222
|
*
|
|
3188
|
-
* @see {@link
|
|
3223
|
+
* @see {@link withDecodingDefaultTypeKey} for the constructor
|
|
3189
3224
|
* @since 4.0.0
|
|
3190
3225
|
*/
|
|
3191
|
-
export interface
|
|
3192
|
-
readonly "
|
|
3226
|
+
export interface withDecodingDefaultTypeKey<S extends Top> extends decodeTo<withDecodingDefaultKey<toType<S>>, optionalKey<S>> {
|
|
3227
|
+
readonly "Rebuild": withDecodingDefaultTypeKey<S>;
|
|
3193
3228
|
}
|
|
3194
3229
|
/**
|
|
3230
|
+
* Makes a struct key optional on the `Encoded` side (`optionalKey`, so the
|
|
3231
|
+
* key may be absent but **not** `undefined`) and provides a default `Type`
|
|
3232
|
+
* value when the key is missing during decoding.
|
|
3233
|
+
*
|
|
3234
|
+
* Unlike {@link withDecodingDefaultKey}, the default value is specified in
|
|
3235
|
+
* terms of the `Type` (decoded) representation, so it does not need to go
|
|
3236
|
+
* through the decoding transformation.
|
|
3237
|
+
*
|
|
3195
3238
|
* **Options**
|
|
3196
3239
|
*
|
|
3197
|
-
* - `encodingStrategy`:
|
|
3198
|
-
* - `passthrough
|
|
3199
|
-
* - `omit`:
|
|
3240
|
+
* - `encodingStrategy`:
|
|
3241
|
+
* - `"passthrough"` (default): include the value in the encoded output.
|
|
3242
|
+
* - `"omit"`: omit the key from the encoded output.
|
|
3243
|
+
*
|
|
3244
|
+
* @see {@link withDecodingDefaultKey} for the variant where the default is an `Encoded` value
|
|
3245
|
+
* @see {@link withDecodingDefaultType} for the value-level variant
|
|
3246
|
+
* @since 4.0.0
|
|
3247
|
+
*/
|
|
3248
|
+
export declare function withDecodingDefaultTypeKey<S extends Top>(defaultValue: Effect.Effect<S["Type"]>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefaultTypeKey<S>;
|
|
3249
|
+
/**
|
|
3250
|
+
* The type produced by {@link withDecodingDefault}: a schema whose `Encoded`
|
|
3251
|
+
* side is `optional` and that fills in a default `Encoded` value during decoding.
|
|
3252
|
+
*
|
|
3253
|
+
* @see {@link withDecodingDefault} for the constructor
|
|
3254
|
+
* @since 4.0.0
|
|
3255
|
+
*/
|
|
3256
|
+
export interface withDecodingDefault<S extends Top> extends decodeTo<S, optional<toEncoded<S>>> {
|
|
3257
|
+
readonly "Rebuild": withDecodingDefault<S>;
|
|
3258
|
+
}
|
|
3259
|
+
/**
|
|
3260
|
+
* Wraps the `Encoded` side with `optional` (key absent **or** `undefined`)
|
|
3261
|
+
* and provides a default `Encoded` value when the field is missing or
|
|
3262
|
+
* `undefined` during decoding.
|
|
3200
3263
|
*
|
|
3201
|
-
*
|
|
3264
|
+
* The default value is specified in terms of the `Encoded` type (before any
|
|
3265
|
+
* decoding transformations).
|
|
3202
3266
|
*
|
|
3203
|
-
*
|
|
3204
|
-
* rather than `optionalKey` (key-level optional).
|
|
3267
|
+
* **Options**
|
|
3205
3268
|
*
|
|
3206
|
-
*
|
|
3207
|
-
*
|
|
3208
|
-
*
|
|
3209
|
-
* - `"omit"`: omit the value from the output
|
|
3269
|
+
* - `encodingStrategy`:
|
|
3270
|
+
* - `"passthrough"` (default): include the value in the encoded output.
|
|
3271
|
+
* - `"omit"`: omit the key from the encoded output.
|
|
3210
3272
|
*
|
|
3211
3273
|
* **Example** (Default for an optional field value)
|
|
3212
3274
|
*
|
|
@@ -3221,10 +3283,42 @@ export interface withDecodingDefault<S extends Top> extends decodeTo<S, optional
|
|
|
3221
3283
|
* // result: { name: "anonymous" }
|
|
3222
3284
|
* ```
|
|
3223
3285
|
*
|
|
3224
|
-
* @see {@link withDecodingDefaultKey} for the key-level variant
|
|
3286
|
+
* @see {@link withDecodingDefaultKey} for the key-level variant (key absent only, not `undefined`)
|
|
3287
|
+
* @see {@link withDecodingDefaultType} for the variant where the default is a `Type` value
|
|
3225
3288
|
* @since 4.0.0
|
|
3226
3289
|
*/
|
|
3227
3290
|
export declare function withDecodingDefault<S extends Top>(defaultValue: Effect.Effect<S["Encoded"]>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefault<S>;
|
|
3291
|
+
/**
|
|
3292
|
+
* The type produced by {@link withDecodingDefaultType}: a schema whose
|
|
3293
|
+
* `Encoded` side is `optional` and that fills in a default `Type` value during
|
|
3294
|
+
* decoding.
|
|
3295
|
+
*
|
|
3296
|
+
* @see {@link withDecodingDefaultType} for the constructor
|
|
3297
|
+
* @since 4.0.0
|
|
3298
|
+
*/
|
|
3299
|
+
export interface withDecodingDefaultType<S extends Top> extends decodeTo<withDecodingDefault<toType<S>>, optional<S>> {
|
|
3300
|
+
readonly "Rebuild": withDecodingDefaultType<S>;
|
|
3301
|
+
}
|
|
3302
|
+
/**
|
|
3303
|
+
* Wraps the `Encoded` side with `optional` (key absent **or** `undefined`)
|
|
3304
|
+
* and provides a default `Type` value when the field is missing or
|
|
3305
|
+
* `undefined` during decoding.
|
|
3306
|
+
*
|
|
3307
|
+
* Unlike {@link withDecodingDefault}, the default value is specified in terms
|
|
3308
|
+
* of the `Type` (decoded) representation, so it does not need to go through
|
|
3309
|
+
* the decoding transformation.
|
|
3310
|
+
*
|
|
3311
|
+
* **Options**
|
|
3312
|
+
*
|
|
3313
|
+
* - `encodingStrategy`:
|
|
3314
|
+
* - `"passthrough"` (default): include the value in the encoded output.
|
|
3315
|
+
* - `"omit"`: omit the key from the encoded output.
|
|
3316
|
+
*
|
|
3317
|
+
* @see {@link withDecodingDefault} for the variant where the default is an `Encoded` value
|
|
3318
|
+
* @see {@link withDecodingDefaultTypeKey} for the key-level variant
|
|
3319
|
+
* @since 4.0.0
|
|
3320
|
+
*/
|
|
3321
|
+
export declare function withDecodingDefaultType<S extends Top>(defaultValue: Effect.Effect<S["Type"]>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefaultType<S>;
|
|
3228
3322
|
/**
|
|
3229
3323
|
* The type produced by {@link tag} — a literal schema with a constructor default.
|
|
3230
3324
|
*
|
|
@@ -3475,7 +3569,7 @@ export declare function TaggedUnion<const CasesByTag extends Record<string, Stru
|
|
|
3475
3569
|
* @see {@link Opaque} for the constructor
|
|
3476
3570
|
* @since 4.0.0
|
|
3477
3571
|
*/
|
|
3478
|
-
export interface Opaque<Self, S extends Top, Brand> extends Bottom<Self, S["Encoded"], S["DecodingServices"], S["EncodingServices"], S["ast"], S["
|
|
3572
|
+
export interface Opaque<Self, S extends Top, Brand> extends Bottom<Self, S["Encoded"], S["DecodingServices"], S["EncodingServices"], S["ast"], S["Rebuild"], S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
3479
3573
|
new (_: never): S["Type"] & Brand;
|
|
3480
3574
|
}
|
|
3481
3575
|
/**
|
|
@@ -3509,7 +3603,7 @@ export declare function Opaque<Self, Brand = {}>(): <S extends Top>(schema: S) =
|
|
|
3509
3603
|
* @since 4.0.0
|
|
3510
3604
|
*/
|
|
3511
3605
|
export interface instanceOf<T, Iso = T> extends declare<T, Iso> {
|
|
3512
|
-
readonly "
|
|
3606
|
+
readonly "Rebuild": instanceOf<T, Iso>;
|
|
3513
3607
|
}
|
|
3514
3608
|
/**
|
|
3515
3609
|
* Creates a schema that validates values using `instanceof`.
|
|
@@ -4578,7 +4672,7 @@ export declare function isUnique<T>(annotations?: Annotations.Filter): AST.Filte
|
|
|
4578
4672
|
* @since 4.0.0
|
|
4579
4673
|
*/
|
|
4580
4674
|
export interface NonEmptyString extends String {
|
|
4581
|
-
readonly "
|
|
4675
|
+
readonly "Rebuild": NonEmptyString;
|
|
4582
4676
|
}
|
|
4583
4677
|
/**
|
|
4584
4678
|
* A schema for non-empty strings. Validates that a string has at least one
|
|
@@ -4595,7 +4689,7 @@ export declare const NonEmptyString: NonEmptyString;
|
|
|
4595
4689
|
* @since 4.0.0
|
|
4596
4690
|
*/
|
|
4597
4691
|
export interface Char extends String {
|
|
4598
|
-
readonly "
|
|
4692
|
+
readonly "Rebuild": Char;
|
|
4599
4693
|
}
|
|
4600
4694
|
/**
|
|
4601
4695
|
* A schema representing a single character.
|
|
@@ -4626,7 +4720,7 @@ export declare const Char: Char;
|
|
|
4626
4720
|
* @since 4.0.0
|
|
4627
4721
|
*/
|
|
4628
4722
|
export interface Option<A extends Top> extends declareConstructor<Option_.Option<A["Type"]>, Option_.Option<A["Encoded"]>, readonly [A], OptionIso<A>> {
|
|
4629
|
-
readonly "
|
|
4723
|
+
readonly "Rebuild": Option<A>;
|
|
4630
4724
|
readonly value: A;
|
|
4631
4725
|
}
|
|
4632
4726
|
/**
|
|
@@ -4653,7 +4747,7 @@ export declare function Option<A extends Top>(value: A): Option<A>;
|
|
|
4653
4747
|
* @since 4.0.0
|
|
4654
4748
|
*/
|
|
4655
4749
|
export interface OptionFromNullOr<S extends Top> extends decodeTo<Option<toType<S>>, NullOr<S>> {
|
|
4656
|
-
readonly "
|
|
4750
|
+
readonly "Rebuild": OptionFromNullOr<S>;
|
|
4657
4751
|
}
|
|
4658
4752
|
/**
|
|
4659
4753
|
* Decodes a nullable, required value `T` to a required `Option<T>` value.
|
|
@@ -4677,7 +4771,7 @@ export declare function OptionFromNullOr<S extends Top>(schema: S): OptionFromNu
|
|
|
4677
4771
|
* @since 4.0.0
|
|
4678
4772
|
*/
|
|
4679
4773
|
export interface OptionFromUndefinedOr<S extends Top> extends decodeTo<Option<toType<S>>, UndefinedOr<S>> {
|
|
4680
|
-
readonly "
|
|
4774
|
+
readonly "Rebuild": OptionFromUndefinedOr<S>;
|
|
4681
4775
|
}
|
|
4682
4776
|
/**
|
|
4683
4777
|
* Decodes an undefined-or value `T` to a required `Option<T>` value.
|
|
@@ -4701,7 +4795,7 @@ export declare function OptionFromUndefinedOr<S extends Top>(schema: S): OptionF
|
|
|
4701
4795
|
* @since 4.0.0
|
|
4702
4796
|
*/
|
|
4703
4797
|
export interface OptionFromNullishOr<S extends Top> extends decodeTo<Option<toType<S>>, NullishOr<S>> {
|
|
4704
|
-
readonly "
|
|
4798
|
+
readonly "Rebuild": OptionFromNullishOr<S>;
|
|
4705
4799
|
}
|
|
4706
4800
|
/**
|
|
4707
4801
|
* Decodes a nullish value `T` to a required `Option<T>` value.
|
|
@@ -4727,7 +4821,7 @@ export declare function OptionFromNullishOr<S extends Top>(schema: S, options?:
|
|
|
4727
4821
|
* @since 4.0.0
|
|
4728
4822
|
*/
|
|
4729
4823
|
export interface OptionFromOptionalKey<S extends Top> extends decodeTo<Option<toType<S>>, optionalKey<S>> {
|
|
4730
|
-
readonly "
|
|
4824
|
+
readonly "Rebuild": OptionFromOptionalKey<S>;
|
|
4731
4825
|
}
|
|
4732
4826
|
/**
|
|
4733
4827
|
* Decodes an optional value `A` to a required `Option<A>` value.
|
|
@@ -4751,7 +4845,7 @@ export declare function OptionFromOptionalKey<S extends Top>(schema: S): OptionF
|
|
|
4751
4845
|
* @since 4.0.0
|
|
4752
4846
|
*/
|
|
4753
4847
|
export interface OptionFromOptional<S extends Top> extends decodeTo<Option<toType<S>>, optional<S>> {
|
|
4754
|
-
readonly "
|
|
4848
|
+
readonly "Rebuild": OptionFromOptional<S>;
|
|
4755
4849
|
}
|
|
4756
4850
|
/**
|
|
4757
4851
|
* Decodes an optional or `undefined` value `A` to an required `Option<A>`
|
|
@@ -4777,7 +4871,7 @@ export declare function OptionFromOptional<S extends Top>(schema: S): OptionFrom
|
|
|
4777
4871
|
* @since 4.0.0
|
|
4778
4872
|
*/
|
|
4779
4873
|
export interface OptionFromOptionalNullOr<S extends Top> extends decodeTo<Option<toType<S>>, optional<NullOr<S>>> {
|
|
4780
|
-
readonly "
|
|
4874
|
+
readonly "Rebuild": OptionFromOptionalNullOr<S>;
|
|
4781
4875
|
}
|
|
4782
4876
|
/**
|
|
4783
4877
|
* Decodes an optional or `null` or `undefined` value `A` to a required `Option<A>`
|
|
@@ -4809,7 +4903,7 @@ export declare function OptionFromOptionalNullOr<S extends Top>(schema: S, optio
|
|
|
4809
4903
|
* @since 4.0.0
|
|
4810
4904
|
*/
|
|
4811
4905
|
export interface Result<A extends Top, E extends Top> extends declareConstructor<Result_.Result<A["Type"], E["Type"]>, Result_.Result<A["Encoded"], E["Encoded"]>, readonly [A, E], ResultIso<A, E>> {
|
|
4812
|
-
readonly "
|
|
4906
|
+
readonly "Rebuild": Result<A, E>;
|
|
4813
4907
|
readonly success: A;
|
|
4814
4908
|
readonly failure: E;
|
|
4815
4909
|
}
|
|
@@ -4839,7 +4933,7 @@ export declare function Result<A extends Top, E extends Top>(success: A, failure
|
|
|
4839
4933
|
* @since 4.0.0
|
|
4840
4934
|
*/
|
|
4841
4935
|
export interface Redacted<S extends Top> extends declareConstructor<Redacted_.Redacted<S["Type"]>, Redacted_.Redacted<S["Encoded"]>, readonly [S]> {
|
|
4842
|
-
readonly "
|
|
4936
|
+
readonly "Rebuild": Redacted<S>;
|
|
4843
4937
|
readonly value: S;
|
|
4844
4938
|
}
|
|
4845
4939
|
/**
|
|
@@ -4875,7 +4969,7 @@ export declare function Redacted<S extends Top>(value: S, options?: {
|
|
|
4875
4969
|
* @since 4.0.0
|
|
4876
4970
|
*/
|
|
4877
4971
|
export interface RedactedFromValue<S extends Top> extends decodeTo<Redacted<toType<S>>, middlewareDecoding<S, S["DecodingServices"]>> {
|
|
4878
|
-
readonly "
|
|
4972
|
+
readonly "Rebuild": RedactedFromValue<S>;
|
|
4879
4973
|
}
|
|
4880
4974
|
/**
|
|
4881
4975
|
* Middleware that wraps decoded errors in `Redacted`, preventing sensitive
|
|
@@ -4905,7 +4999,7 @@ export declare function RedactedFromValue<S extends Top>(value: S, options?: {
|
|
|
4905
4999
|
* @since 4.0.0
|
|
4906
5000
|
*/
|
|
4907
5001
|
export interface CauseReason<E extends Top, D extends Top> extends declareConstructor<Cause_.Reason<E["Type"]>, Cause_.Reason<E["Encoded"]>, readonly [E, D], CauseReasonIso<E, D>> {
|
|
4908
|
-
readonly "
|
|
5002
|
+
readonly "Rebuild": CauseReason<E, D>;
|
|
4909
5003
|
readonly error: E;
|
|
4910
5004
|
readonly defect: D;
|
|
4911
5005
|
}
|
|
@@ -4938,7 +5032,7 @@ export declare function CauseReason<E extends Top, D extends Top>(error: E, defe
|
|
|
4938
5032
|
* @since 4.0.0
|
|
4939
5033
|
*/
|
|
4940
5034
|
export interface Cause<E extends Top, D extends Top> extends declareConstructor<Cause_.Cause<E["Type"]>, Cause_.Cause<E["Encoded"]>, readonly [E, D], CauseIso<E, D>> {
|
|
4941
|
-
readonly "
|
|
5035
|
+
readonly "Rebuild": Cause<E, D>;
|
|
4942
5036
|
readonly error: E;
|
|
4943
5037
|
readonly defect: D;
|
|
4944
5038
|
}
|
|
@@ -4961,7 +5055,7 @@ export declare function Cause<E extends Top, D extends Top>(error: E, defect: D)
|
|
|
4961
5055
|
* @since 4.0.0
|
|
4962
5056
|
*/
|
|
4963
5057
|
export interface Error extends instanceOf<globalThis.Error> {
|
|
4964
|
-
readonly "
|
|
5058
|
+
readonly "Rebuild": Error;
|
|
4965
5059
|
}
|
|
4966
5060
|
/**
|
|
4967
5061
|
* A schema that represents `Error` objects.
|
|
@@ -4997,7 +5091,7 @@ export interface Defect extends Union<readonly [
|
|
|
4997
5091
|
}>>,
|
|
4998
5092
|
decodeTo<Unknown, Any>
|
|
4999
5093
|
]> {
|
|
5000
|
-
readonly "
|
|
5094
|
+
readonly "Rebuild": Defect;
|
|
5001
5095
|
}
|
|
5002
5096
|
/**
|
|
5003
5097
|
* A schema that represents defects.
|
|
@@ -5022,7 +5116,7 @@ export declare const DefectWithStack: Defect;
|
|
|
5022
5116
|
* @since 4.0.0
|
|
5023
5117
|
*/
|
|
5024
5118
|
export interface Exit<A extends Top, E extends Top, D extends Top> extends declareConstructor<Exit_.Exit<A["Type"], E["Type"]>, Exit_.Exit<A["Encoded"], E["Encoded"]>, readonly [A, E, D], ExitIso<A, E, D>> {
|
|
5025
|
-
readonly "
|
|
5119
|
+
readonly "Rebuild": Exit<A, E, D>;
|
|
5026
5120
|
readonly value: A;
|
|
5027
5121
|
readonly error: E;
|
|
5028
5122
|
readonly defect: D;
|
|
@@ -5052,7 +5146,7 @@ export declare function Exit<A extends Top, E extends Top, D extends Top>(value:
|
|
|
5052
5146
|
* @since 4.0.0
|
|
5053
5147
|
*/
|
|
5054
5148
|
export interface $ReadonlyMap<Key extends Top, Value extends Top> extends declareConstructor<globalThis.ReadonlyMap<Key["Type"], Value["Type"]>, globalThis.ReadonlyMap<Key["Encoded"], Value["Encoded"]>, readonly [Key, Value], ReadonlyMapIso<Key, Value>> {
|
|
5055
|
-
readonly "
|
|
5149
|
+
readonly "Rebuild": $ReadonlyMap<Key, Value>;
|
|
5056
5150
|
readonly key: Key;
|
|
5057
5151
|
readonly value: Value;
|
|
5058
5152
|
}
|
|
@@ -5077,7 +5171,7 @@ export declare function ReadonlyMap<Key extends Top, Value extends Top>(key: Key
|
|
|
5077
5171
|
* @since 4.0.0
|
|
5078
5172
|
*/
|
|
5079
5173
|
export interface HashMap<Key extends Top, Value extends Top> extends declareConstructor<HashMap_.HashMap<Key["Type"], Value["Type"]>, HashMap_.HashMap<Key["Encoded"], Value["Encoded"]>, readonly [Key, Value], HashMapIso<Key, Value>> {
|
|
5080
|
-
readonly "
|
|
5174
|
+
readonly "Rebuild": HashMap<Key, Value>;
|
|
5081
5175
|
readonly key: Key;
|
|
5082
5176
|
readonly value: Value;
|
|
5083
5177
|
}
|
|
@@ -5101,7 +5195,7 @@ export declare function HashMap<Key extends Top, Value extends Top>(key: Key, va
|
|
|
5101
5195
|
* @since 4.0.0
|
|
5102
5196
|
*/
|
|
5103
5197
|
export interface $ReadonlySet<Value extends Top> extends declareConstructor<globalThis.ReadonlySet<Value["Type"]>, globalThis.ReadonlySet<Value["Encoded"]>, readonly [Value], ReadonlySetIso<Value>> {
|
|
5104
|
-
readonly "
|
|
5198
|
+
readonly "Rebuild": $ReadonlySet<Value>;
|
|
5105
5199
|
readonly value: Value;
|
|
5106
5200
|
}
|
|
5107
5201
|
/**
|
|
@@ -5122,7 +5216,7 @@ export declare function ReadonlySet<Value extends Top>(value: Value): $ReadonlyS
|
|
|
5122
5216
|
* @since 4.0.0
|
|
5123
5217
|
*/
|
|
5124
5218
|
export interface HashSet<Value extends Top> extends declareConstructor<HashSet_.HashSet<Value["Type"]>, HashSet_.HashSet<Value["Encoded"]>, readonly [Value], HashSetIso<Value>> {
|
|
5125
|
-
readonly "
|
|
5219
|
+
readonly "Rebuild": HashSet<Value>;
|
|
5126
5220
|
readonly value: Value;
|
|
5127
5221
|
}
|
|
5128
5222
|
/**
|
|
@@ -5146,7 +5240,7 @@ export declare function HashSet<Value extends Top>(value: Value): HashSet<Value>
|
|
|
5146
5240
|
* @since 4.0.0
|
|
5147
5241
|
*/
|
|
5148
5242
|
export interface Chunk<Value extends Top> extends declareConstructor<Chunk_.Chunk<Value["Type"]>, Chunk_.Chunk<Value["Encoded"]>, readonly [Value], ChunkIso<Value>> {
|
|
5149
|
-
readonly "
|
|
5243
|
+
readonly "Rebuild": Chunk<Value>;
|
|
5150
5244
|
readonly value: Value;
|
|
5151
5245
|
}
|
|
5152
5246
|
/**
|
|
@@ -5169,7 +5263,7 @@ export declare function Chunk<Value extends Top>(value: Value): Chunk<Value>;
|
|
|
5169
5263
|
* @since 4.0.0
|
|
5170
5264
|
*/
|
|
5171
5265
|
export interface RegExp extends instanceOf<globalThis.RegExp> {
|
|
5172
|
-
readonly "
|
|
5266
|
+
readonly "Rebuild": RegExp;
|
|
5173
5267
|
}
|
|
5174
5268
|
/**
|
|
5175
5269
|
* Schema for JavaScript `RegExp` objects.
|
|
@@ -5187,7 +5281,7 @@ export declare const RegExp: RegExp;
|
|
|
5187
5281
|
* @since 4.0.0
|
|
5188
5282
|
*/
|
|
5189
5283
|
export interface URL extends instanceOf<globalThis.URL> {
|
|
5190
|
-
readonly "
|
|
5284
|
+
readonly "Rebuild": URL;
|
|
5191
5285
|
}
|
|
5192
5286
|
/**
|
|
5193
5287
|
* A schema for JavaScript `URL` objects.
|
|
@@ -5207,7 +5301,7 @@ export declare const URL: URL;
|
|
|
5207
5301
|
* @since 4.0.0
|
|
5208
5302
|
*/
|
|
5209
5303
|
export interface URLFromString extends decodeTo<URL, String> {
|
|
5210
|
-
readonly "
|
|
5304
|
+
readonly "Rebuild": URLFromString;
|
|
5211
5305
|
}
|
|
5212
5306
|
/**
|
|
5213
5307
|
* A transformation schema that decodes a `string` into a `URL`.
|
|
@@ -5229,7 +5323,7 @@ export declare const URLFromString: URLFromString;
|
|
|
5229
5323
|
* @since 4.0.0
|
|
5230
5324
|
*/
|
|
5231
5325
|
export interface Date extends instanceOf<globalThis.Date> {
|
|
5232
|
-
readonly "
|
|
5326
|
+
readonly "Rebuild": Date;
|
|
5233
5327
|
}
|
|
5234
5328
|
/**
|
|
5235
5329
|
* A schema for JavaScript `Date` objects.
|
|
@@ -5258,7 +5352,7 @@ export declare const Date: Date;
|
|
|
5258
5352
|
* @since 4.0.0
|
|
5259
5353
|
*/
|
|
5260
5354
|
export interface DateFromString extends decodeTo<Date, String> {
|
|
5261
|
-
readonly "
|
|
5355
|
+
readonly "Rebuild": DateFromString;
|
|
5262
5356
|
}
|
|
5263
5357
|
/**
|
|
5264
5358
|
* A transformation schema that parses an ISO 8601 string into a `Date`.
|
|
@@ -5280,7 +5374,7 @@ export declare const DateFromString: DateFromString;
|
|
|
5280
5374
|
* @since 4.0.0
|
|
5281
5375
|
*/
|
|
5282
5376
|
export interface DateValid extends Date {
|
|
5283
|
-
readonly "
|
|
5377
|
+
readonly "Rebuild": DateValid;
|
|
5284
5378
|
}
|
|
5285
5379
|
/**
|
|
5286
5380
|
* A schema for **valid** JavaScript `Date` objects.
|
|
@@ -5299,7 +5393,7 @@ export declare const DateValid: DateValid;
|
|
|
5299
5393
|
* @since 4.0.0
|
|
5300
5394
|
*/
|
|
5301
5395
|
export interface Duration extends declare<Duration_.Duration> {
|
|
5302
|
-
readonly "
|
|
5396
|
+
readonly "Rebuild": Duration;
|
|
5303
5397
|
}
|
|
5304
5398
|
/**
|
|
5305
5399
|
* A schema for `Duration` values.
|
|
@@ -5329,7 +5423,7 @@ export declare const Duration: Duration;
|
|
|
5329
5423
|
* @since 4.0.0
|
|
5330
5424
|
*/
|
|
5331
5425
|
export interface DurationFromNanos extends decodeTo<Duration, BigInt> {
|
|
5332
|
-
readonly "
|
|
5426
|
+
readonly "Rebuild": DurationFromNanos;
|
|
5333
5427
|
}
|
|
5334
5428
|
/**
|
|
5335
5429
|
* A transformation schema that decodes a non-negative `bigint` into a
|
|
@@ -5352,7 +5446,7 @@ export declare const DurationFromNanos: DurationFromNanos;
|
|
|
5352
5446
|
* @since 4.0.0
|
|
5353
5447
|
*/
|
|
5354
5448
|
export interface DurationFromMillis extends decodeTo<Duration, Number> {
|
|
5355
|
-
readonly "
|
|
5449
|
+
readonly "Rebuild": DurationFromMillis;
|
|
5356
5450
|
}
|
|
5357
5451
|
/**
|
|
5358
5452
|
* A transformation schema that decodes a non-negative (possibly infinite)
|
|
@@ -5378,7 +5472,7 @@ export declare const DurationFromMillis: DurationFromMillis;
|
|
|
5378
5472
|
* @since 4.0.0
|
|
5379
5473
|
*/
|
|
5380
5474
|
export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
|
|
5381
|
-
readonly "
|
|
5475
|
+
readonly "Rebuild": BigDecimal;
|
|
5382
5476
|
}
|
|
5383
5477
|
/**
|
|
5384
5478
|
* A schema for `BigDecimal` values.
|
|
@@ -5398,7 +5492,7 @@ export declare const BigDecimal: BigDecimal;
|
|
|
5398
5492
|
* @since 4.0.0
|
|
5399
5493
|
*/
|
|
5400
5494
|
export interface BigDecimalFromString extends decodeTo<BigDecimal, String> {
|
|
5401
|
-
readonly "
|
|
5495
|
+
readonly "Rebuild": BigDecimalFromString;
|
|
5402
5496
|
}
|
|
5403
5497
|
/**
|
|
5404
5498
|
* A transformation schema that parses a string into a `BigDecimal`.
|
|
@@ -5420,7 +5514,7 @@ export declare const BigDecimalFromString: BigDecimalFromString;
|
|
|
5420
5514
|
* @since 4.0.0
|
|
5421
5515
|
*/
|
|
5422
5516
|
export interface UnknownFromJsonString extends fromJsonString<Unknown> {
|
|
5423
|
-
readonly "
|
|
5517
|
+
readonly "Rebuild": UnknownFromJsonString;
|
|
5424
5518
|
}
|
|
5425
5519
|
/**
|
|
5426
5520
|
* A transformation schema that decodes a JSON-encoded string into an `unknown` value.
|
|
@@ -5453,7 +5547,7 @@ export declare const UnknownFromJsonString: UnknownFromJsonString;
|
|
|
5453
5547
|
* @since 4.0.0
|
|
5454
5548
|
*/
|
|
5455
5549
|
export interface fromJsonString<S extends Top> extends decodeTo<S, String> {
|
|
5456
|
-
readonly "
|
|
5550
|
+
readonly "Rebuild": fromJsonString<S>;
|
|
5457
5551
|
}
|
|
5458
5552
|
/**
|
|
5459
5553
|
* Returns a schema that decodes a JSON string and then decodes the parsed value
|
|
@@ -5527,7 +5621,7 @@ export declare function fromJsonString<S extends Top>(schema: S): fromJsonString
|
|
|
5527
5621
|
* @since 4.0.0
|
|
5528
5622
|
*/
|
|
5529
5623
|
export interface File extends instanceOf<globalThis.File> {
|
|
5530
|
-
readonly "
|
|
5624
|
+
readonly "Rebuild": File;
|
|
5531
5625
|
}
|
|
5532
5626
|
/**
|
|
5533
5627
|
* Schema for JavaScript `File` objects.
|
|
@@ -5546,7 +5640,7 @@ export declare const File: File;
|
|
|
5546
5640
|
* @since 4.0.0
|
|
5547
5641
|
*/
|
|
5548
5642
|
export interface FormData extends instanceOf<globalThis.FormData> {
|
|
5549
|
-
readonly "
|
|
5643
|
+
readonly "Rebuild": FormData;
|
|
5550
5644
|
}
|
|
5551
5645
|
/**
|
|
5552
5646
|
* Schema for JavaScript `FormData` objects.
|
|
@@ -5565,7 +5659,7 @@ export declare const FormData: FormData;
|
|
|
5565
5659
|
* @since 4.0.0
|
|
5566
5660
|
*/
|
|
5567
5661
|
export interface fromFormData<S extends Top> extends decodeTo<S, FormData> {
|
|
5568
|
-
readonly "
|
|
5662
|
+
readonly "Rebuild": fromFormData<S>;
|
|
5569
5663
|
}
|
|
5570
5664
|
/**
|
|
5571
5665
|
* `Schema.fromFormData` returns a schema that reads a `FormData` instance,
|
|
@@ -5658,7 +5752,7 @@ export declare function fromFormData<S extends Top>(schema: S): fromFormData<S>;
|
|
|
5658
5752
|
* @since 4.0.0
|
|
5659
5753
|
*/
|
|
5660
5754
|
export interface URLSearchParams extends instanceOf<globalThis.URLSearchParams> {
|
|
5661
|
-
readonly "
|
|
5755
|
+
readonly "Rebuild": URLSearchParams;
|
|
5662
5756
|
}
|
|
5663
5757
|
/**
|
|
5664
5758
|
* Schema for JavaScript `URLSearchParams` objects.
|
|
@@ -5676,7 +5770,7 @@ export declare const URLSearchParams: URLSearchParams;
|
|
|
5676
5770
|
* @since 4.0.0
|
|
5677
5771
|
*/
|
|
5678
5772
|
export interface fromURLSearchParams<S extends Top> extends decodeTo<S, URLSearchParams> {
|
|
5679
|
-
readonly "
|
|
5773
|
+
readonly "Rebuild": fromURLSearchParams<S>;
|
|
5680
5774
|
}
|
|
5681
5775
|
/**
|
|
5682
5776
|
* `Schema.fromURLSearchParams` returns a schema that reads a `URLSearchParams`
|
|
@@ -5760,7 +5854,7 @@ export declare function fromURLSearchParams<S extends Top>(schema: S): fromURLSe
|
|
|
5760
5854
|
* @since 4.0.0
|
|
5761
5855
|
*/
|
|
5762
5856
|
export interface Finite extends Number {
|
|
5763
|
-
readonly "
|
|
5857
|
+
readonly "Rebuild": Finite;
|
|
5764
5858
|
}
|
|
5765
5859
|
/**
|
|
5766
5860
|
* A schema for finite numbers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
@@ -5776,7 +5870,7 @@ export declare const Finite: Finite;
|
|
|
5776
5870
|
* @since 4.0.0
|
|
5777
5871
|
*/
|
|
5778
5872
|
export interface Int extends Number {
|
|
5779
|
-
readonly "
|
|
5873
|
+
readonly "Rebuild": Int;
|
|
5780
5874
|
}
|
|
5781
5875
|
/**
|
|
5782
5876
|
* A schema for integers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
@@ -5792,7 +5886,7 @@ export declare const Int: Int;
|
|
|
5792
5886
|
* @since 4.0.0
|
|
5793
5887
|
*/
|
|
5794
5888
|
export interface NumberFromString extends decodeTo<Finite, String> {
|
|
5795
|
-
readonly "
|
|
5889
|
+
readonly "Rebuild": NumberFromString;
|
|
5796
5890
|
}
|
|
5797
5891
|
/**
|
|
5798
5892
|
* A transformation schema that parses a string into a number.
|
|
@@ -5814,7 +5908,7 @@ export declare const NumberFromString: NumberFromString;
|
|
|
5814
5908
|
* @since 4.0.0
|
|
5815
5909
|
*/
|
|
5816
5910
|
export interface FiniteFromString extends decodeTo<Finite, String> {
|
|
5817
|
-
readonly "
|
|
5911
|
+
readonly "Rebuild": FiniteFromString;
|
|
5818
5912
|
}
|
|
5819
5913
|
/**
|
|
5820
5914
|
* A transformation schema that parses a string into a finite number.
|
|
@@ -5837,7 +5931,7 @@ export declare const FiniteFromString: FiniteFromString;
|
|
|
5837
5931
|
* @since 4.0.0
|
|
5838
5932
|
*/
|
|
5839
5933
|
export interface BigIntFromString extends decodeTo<BigInt, String> {
|
|
5840
|
-
readonly "
|
|
5934
|
+
readonly "Rebuild": BigIntFromString;
|
|
5841
5935
|
}
|
|
5842
5936
|
/**
|
|
5843
5937
|
* A transformation schema that parses a string into a `bigint`.
|
|
@@ -5859,7 +5953,7 @@ export declare const BigIntFromString: BigIntFromString;
|
|
|
5859
5953
|
* @since 4.0.0
|
|
5860
5954
|
*/
|
|
5861
5955
|
export interface Trimmed extends String {
|
|
5862
|
-
readonly "
|
|
5956
|
+
readonly "Rebuild": Trimmed;
|
|
5863
5957
|
}
|
|
5864
5958
|
/**
|
|
5865
5959
|
* A schema for strings that contains no leading or trailing whitespaces.
|
|
@@ -5875,7 +5969,7 @@ export declare const Trimmed: Trimmed;
|
|
|
5875
5969
|
* @since 4.0.0
|
|
5876
5970
|
*/
|
|
5877
5971
|
export interface Trim extends decodeTo<Trimmed, String> {
|
|
5878
|
-
readonly "
|
|
5972
|
+
readonly "Rebuild": Trim;
|
|
5879
5973
|
}
|
|
5880
5974
|
/**
|
|
5881
5975
|
* A transformation schema that trims whitespace from a string.
|
|
@@ -5897,7 +5991,7 @@ export declare const Trim: Trim;
|
|
|
5897
5991
|
* @since 4.0.0
|
|
5898
5992
|
*/
|
|
5899
5993
|
export interface StringFromBase64 extends decodeTo<String, String> {
|
|
5900
|
-
readonly "
|
|
5994
|
+
readonly "Rebuild": StringFromBase64;
|
|
5901
5995
|
}
|
|
5902
5996
|
/**
|
|
5903
5997
|
* Decodes a base64 (RFC4648) encoded string into a UTF-8 string.
|
|
@@ -5919,7 +6013,7 @@ export declare const StringFromBase64: StringFromBase64;
|
|
|
5919
6013
|
* @since 4.0.0
|
|
5920
6014
|
*/
|
|
5921
6015
|
export interface StringFromBase64Url extends decodeTo<String, String> {
|
|
5922
|
-
readonly "
|
|
6016
|
+
readonly "Rebuild": StringFromBase64Url;
|
|
5923
6017
|
}
|
|
5924
6018
|
/**
|
|
5925
6019
|
* Decodes a base64 (URL) encoded string into a UTF-8 string.
|
|
@@ -5941,7 +6035,7 @@ export declare const StringFromBase64Url: StringFromBase64Url;
|
|
|
5941
6035
|
* @since 4.0.0
|
|
5942
6036
|
*/
|
|
5943
6037
|
export interface StringFromHex extends decodeTo<String, String> {
|
|
5944
|
-
readonly "
|
|
6038
|
+
readonly "Rebuild": StringFromHex;
|
|
5945
6039
|
}
|
|
5946
6040
|
/**
|
|
5947
6041
|
* Decodes a hex encoded string into a UTF-8 string.
|
|
@@ -5963,7 +6057,7 @@ export declare const StringFromHex: StringFromHex;
|
|
|
5963
6057
|
* @since 4.0.0
|
|
5964
6058
|
*/
|
|
5965
6059
|
export interface StringFromUriComponent extends decodeTo<String, String> {
|
|
5966
|
-
readonly "
|
|
6060
|
+
readonly "Rebuild": StringFromUriComponent;
|
|
5967
6061
|
}
|
|
5968
6062
|
/**
|
|
5969
6063
|
* Decodes a URI component encoded string into a UTF-8 string.
|
|
@@ -6023,7 +6117,7 @@ export declare const StandardSchemaV1FailureResult: Struct<{
|
|
|
6023
6117
|
* @since 4.0.0
|
|
6024
6118
|
*/
|
|
6025
6119
|
export interface BooleanFromBit extends decodeTo<Boolean, Literals<readonly [0, 1]>> {
|
|
6026
|
-
readonly "
|
|
6120
|
+
readonly "Rebuild": BooleanFromBit;
|
|
6027
6121
|
}
|
|
6028
6122
|
/**
|
|
6029
6123
|
* A boolean parsed from 0 or 1.
|
|
@@ -6039,7 +6133,7 @@ export declare const BooleanFromBit: BooleanFromBit;
|
|
|
6039
6133
|
* @since 4.0.0
|
|
6040
6134
|
*/
|
|
6041
6135
|
export interface Uint8Array extends instanceOf<globalThis.Uint8Array<ArrayBufferLike>> {
|
|
6042
|
-
readonly "
|
|
6136
|
+
readonly "Rebuild": Uint8Array;
|
|
6043
6137
|
}
|
|
6044
6138
|
/**
|
|
6045
6139
|
* A schema for JavaScript `Uint8Array` objects.
|
|
@@ -6059,7 +6153,7 @@ export declare const Uint8Array: Uint8Array;
|
|
|
6059
6153
|
* @since 4.0.0
|
|
6060
6154
|
*/
|
|
6061
6155
|
export interface Uint8ArrayFromBase64 extends decodeTo<Uint8Array, String> {
|
|
6062
|
-
readonly "
|
|
6156
|
+
readonly "Rebuild": Uint8ArrayFromBase64;
|
|
6063
6157
|
}
|
|
6064
6158
|
/**
|
|
6065
6159
|
* A transformation schema that decodes a base64 encoded string into a
|
|
@@ -6082,7 +6176,7 @@ export declare const Uint8ArrayFromBase64: Uint8ArrayFromBase64;
|
|
|
6082
6176
|
* @since 4.0.0
|
|
6083
6177
|
*/
|
|
6084
6178
|
export interface Uint8ArrayFromBase64Url extends decodeTo<Uint8Array, String> {
|
|
6085
|
-
readonly "
|
|
6179
|
+
readonly "Rebuild": Uint8ArrayFromBase64Url;
|
|
6086
6180
|
}
|
|
6087
6181
|
/**
|
|
6088
6182
|
* A transformation schema that decodes a base64 (URL) encoded string into a
|
|
@@ -6105,7 +6199,7 @@ export declare const Uint8ArrayFromBase64Url: Uint8ArrayFromBase64Url;
|
|
|
6105
6199
|
* @since 4.0.0
|
|
6106
6200
|
*/
|
|
6107
6201
|
export interface Uint8ArrayFromHex extends decodeTo<Uint8Array, String> {
|
|
6108
|
-
readonly "
|
|
6202
|
+
readonly "Rebuild": Uint8ArrayFromHex;
|
|
6109
6203
|
}
|
|
6110
6204
|
/**
|
|
6111
6205
|
* A transformation schema that decodes a hex encoded string into a
|
|
@@ -6128,7 +6222,7 @@ export declare const Uint8ArrayFromHex: Uint8ArrayFromHex;
|
|
|
6128
6222
|
* @since 4.0.0
|
|
6129
6223
|
*/
|
|
6130
6224
|
export interface DateTimeUtc extends declare<DateTime.Utc> {
|
|
6131
|
-
readonly "
|
|
6225
|
+
readonly "Rebuild": DateTimeUtc;
|
|
6132
6226
|
}
|
|
6133
6227
|
/**
|
|
6134
6228
|
* A schema for `DateTime.Utc` values.
|
|
@@ -6148,7 +6242,7 @@ export declare const DateTimeUtc: DateTimeUtc;
|
|
|
6148
6242
|
* @since 4.0.0
|
|
6149
6243
|
*/
|
|
6150
6244
|
export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
|
|
6151
|
-
readonly "
|
|
6245
|
+
readonly "Rebuild": DateTimeUtcFromDate;
|
|
6152
6246
|
}
|
|
6153
6247
|
/**
|
|
6154
6248
|
* A transformation schema that decodes a `Date` into a `DateTime.Utc`.
|
|
@@ -6170,7 +6264,7 @@ export declare const DateTimeUtcFromDate: DateTimeUtcFromDate;
|
|
|
6170
6264
|
* @since 4.0.0
|
|
6171
6265
|
*/
|
|
6172
6266
|
export interface DateTimeUtcFromString extends decodeTo<DateTimeUtc, String> {
|
|
6173
|
-
readonly "
|
|
6267
|
+
readonly "Rebuild": DateTimeUtcFromString;
|
|
6174
6268
|
}
|
|
6175
6269
|
/**
|
|
6176
6270
|
* A transformation schema that decodes a string into a `DateTime.Utc`.
|
|
@@ -6194,7 +6288,7 @@ export declare const DateTimeUtcFromString: DateTimeUtcFromString;
|
|
|
6194
6288
|
* @since 4.0.0
|
|
6195
6289
|
*/
|
|
6196
6290
|
export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>, Number> {
|
|
6197
|
-
readonly "
|
|
6291
|
+
readonly "Rebuild": DateTimeUtcFromMillis;
|
|
6198
6292
|
}
|
|
6199
6293
|
/**
|
|
6200
6294
|
* A transformation schema that decodes a number into a `DateTime.Utc`.
|
|
@@ -6216,7 +6310,7 @@ export declare const DateTimeUtcFromMillis: DateTimeUtcFromMillis;
|
|
|
6216
6310
|
* @since 4.0.0
|
|
6217
6311
|
*/
|
|
6218
6312
|
export interface TimeZoneOffset extends declare<DateTime.TimeZone.Offset> {
|
|
6219
|
-
readonly "
|
|
6313
|
+
readonly "Rebuild": TimeZoneOffset;
|
|
6220
6314
|
}
|
|
6221
6315
|
/**
|
|
6222
6316
|
* A schema for `DateTime.TimeZone.Offset` values.
|
|
@@ -6236,7 +6330,7 @@ export declare const TimeZoneOffset: TimeZoneOffset;
|
|
|
6236
6330
|
* @since 4.0.0
|
|
6237
6331
|
*/
|
|
6238
6332
|
export interface TimeZoneNamed extends declare<DateTime.TimeZone.Named> {
|
|
6239
|
-
readonly "
|
|
6333
|
+
readonly "Rebuild": TimeZoneNamed;
|
|
6240
6334
|
}
|
|
6241
6335
|
/**
|
|
6242
6336
|
* A schema for `DateTime.TimeZone.Named` values.
|
|
@@ -6256,7 +6350,7 @@ export declare const TimeZoneNamed: TimeZoneNamed;
|
|
|
6256
6350
|
* @since 4.0.0
|
|
6257
6351
|
*/
|
|
6258
6352
|
export interface TimeZoneNamedFromString extends decodeTo<TimeZoneNamed, String> {
|
|
6259
|
-
readonly "
|
|
6353
|
+
readonly "Rebuild": TimeZoneNamedFromString;
|
|
6260
6354
|
}
|
|
6261
6355
|
/**
|
|
6262
6356
|
* A transformation schema that parses an IANA time zone identifier string into a `DateTime.TimeZone.Named`.
|
|
@@ -6278,7 +6372,7 @@ export declare const TimeZoneNamedFromString: TimeZoneNamedFromString;
|
|
|
6278
6372
|
* @since 4.0.0
|
|
6279
6373
|
*/
|
|
6280
6374
|
export interface TimeZone extends declare<DateTime.TimeZone> {
|
|
6281
|
-
readonly "
|
|
6375
|
+
readonly "Rebuild": TimeZone;
|
|
6282
6376
|
}
|
|
6283
6377
|
/**
|
|
6284
6378
|
* A schema for `DateTime.TimeZone` values.
|
|
@@ -6299,7 +6393,7 @@ export declare const TimeZone: TimeZone;
|
|
|
6299
6393
|
* @since 4.0.0
|
|
6300
6394
|
*/
|
|
6301
6395
|
export interface TimeZoneFromString extends decodeTo<TimeZone, String> {
|
|
6302
|
-
readonly "
|
|
6396
|
+
readonly "Rebuild": TimeZoneFromString;
|
|
6303
6397
|
}
|
|
6304
6398
|
/**
|
|
6305
6399
|
* A transformation schema that parses a time zone string into a `DateTime.TimeZone`.
|
|
@@ -6321,7 +6415,7 @@ export declare const TimeZoneFromString: TimeZoneFromString;
|
|
|
6321
6415
|
* @since 4.0.0
|
|
6322
6416
|
*/
|
|
6323
6417
|
export interface DateTimeZoned extends declare<DateTime.Zoned> {
|
|
6324
|
-
readonly "
|
|
6418
|
+
readonly "Rebuild": DateTimeZoned;
|
|
6325
6419
|
}
|
|
6326
6420
|
/**
|
|
6327
6421
|
* A schema for `DateTime.Zoned` values.
|
|
@@ -6342,7 +6436,7 @@ export declare const DateTimeZoned: DateTimeZoned;
|
|
|
6342
6436
|
* @since 4.0.0
|
|
6343
6437
|
*/
|
|
6344
6438
|
export interface DateTimeZonedFromString extends decodeTo<DateTimeZoned, String> {
|
|
6345
|
-
readonly "
|
|
6439
|
+
readonly "Rebuild": DateTimeZonedFromString;
|
|
6346
6440
|
}
|
|
6347
6441
|
/**
|
|
6348
6442
|
* A transformation schema that parses a zoned DateTime string into a `DateTime.Zoned`.
|
|
@@ -6370,7 +6464,7 @@ export declare const DateTimeZonedFromString: DateTimeZonedFromString;
|
|
|
6370
6464
|
*/
|
|
6371
6465
|
export interface Class<Self, S extends Top & {
|
|
6372
6466
|
readonly fields: Struct.Fields;
|
|
6373
|
-
}, Inherited> extends Bottom<Self, S["Encoded"], S["DecodingServices"], S["EncodingServices"], AST.Declaration, decodeTo<declareConstructor<Self, S["Encoded"], readonly [S], S["Iso"]>, S>, S["~type.make.in"], S["Iso"], readonly [S], Self, S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
6467
|
+
}, Inherited> extends Bottom<Self, S["Encoded"], S["DecodingServices"], S["EncodingServices"], AST.Declaration, decodeTo<declareConstructor<Self, S["Encoded"], readonly [S], S["Iso"]>, S>, RequiredKeys<S["~type.make.in"]> extends never ? void | S["~type.make.in"] : S["~type.make.in"], S["Iso"], readonly [S], Self, S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
6374
6468
|
new (...args: {} extends S["~type.make.in"] ? [props?: S["~type.make.in"], options?: MakeOptions] : [props: S["~type.make.in"], options?: MakeOptions]): S["Type"] & Inherited;
|
|
6375
6469
|
readonly identifier: string;
|
|
6376
6470
|
readonly fields: S["fields"];
|
|
@@ -6687,17 +6781,6 @@ export declare const TaggedClass: {
|
|
|
6687
6781
|
} & S["fields"]>>, Brand>;
|
|
6688
6782
|
};
|
|
6689
6783
|
};
|
|
6690
|
-
/**
|
|
6691
|
-
* Interface for schema-backed error classes created with {@link ErrorClass}.
|
|
6692
|
-
* Extends {@link Class} and is also a `YieldableError`, so instances
|
|
6693
|
-
* can be yielded inside `Effect.gen` as failures.
|
|
6694
|
-
*
|
|
6695
|
-
* @since 4.0.0
|
|
6696
|
-
*/
|
|
6697
|
-
export interface ErrorClass<Self, S extends Top & {
|
|
6698
|
-
readonly fields: Struct.Fields;
|
|
6699
|
-
}, Inherited> extends Class<Self, S, Inherited> {
|
|
6700
|
-
}
|
|
6701
6784
|
/**
|
|
6702
6785
|
* Creates a schema-backed error class that can be used as a typed,
|
|
6703
6786
|
* yieldable error in Effect programs. Combines {@link Class} validation with
|
|
@@ -6945,7 +7028,7 @@ export declare function toArbitrary<S extends Top>(schema: S): FastCheck.Arbitra
|
|
|
6945
7028
|
* @category Formatter
|
|
6946
7029
|
* @since 4.0.0
|
|
6947
7030
|
*/
|
|
6948
|
-
export declare function overrideToFormatter<S extends Top>(toFormatter: () => Formatter<S["Type"]>): (self: S) => S["
|
|
7031
|
+
export declare function overrideToFormatter<S extends Top>(toFormatter: () => Formatter<S["Type"]>): (self: S) => S["Rebuild"];
|
|
6949
7032
|
/**
|
|
6950
7033
|
* Derives a string formatter function from a schema. The formatter converts
|
|
6951
7034
|
* a value to its human-readable string representation, recursing into structs,
|
|
@@ -6968,7 +7051,7 @@ export declare function toFormatter<T>(schema: Schema<T>, options?: {
|
|
|
6968
7051
|
* @category Equivalence
|
|
6969
7052
|
* @since 4.0.0
|
|
6970
7053
|
*/
|
|
6971
|
-
export declare function overrideToEquivalence<S extends Top>(toEquivalence: () => Equivalence.Equivalence<S["Type"]>): (self: S) => S["
|
|
7054
|
+
export declare function overrideToEquivalence<S extends Top>(toEquivalence: () => Equivalence.Equivalence<S["Type"]>): (self: S) => S["Rebuild"];
|
|
6972
7055
|
/**
|
|
6973
7056
|
* Derives an `Equivalence` from a schema. Two values are considered equal when
|
|
6974
7057
|
* every field (and nested field) compares equal according to the schema
|