effect 3.13.2 → 3.13.4
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/cjs/FiberHandle.js +5 -3
- package/dist/cjs/FiberHandle.js.map +1 -1
- package/dist/cjs/FiberMap.js +5 -3
- package/dist/cjs/FiberMap.js.map +1 -1
- package/dist/cjs/FiberSet.js +6 -3
- package/dist/cjs/FiberSet.js.map +1 -1
- package/dist/cjs/JSONSchema.js +7 -7
- package/dist/cjs/JSONSchema.js.map +1 -1
- package/dist/cjs/Option.js +3 -15
- package/dist/cjs/Option.js.map +1 -1
- package/dist/cjs/ParseResult.js +1 -1
- package/dist/cjs/ParseResult.js.map +1 -1
- package/dist/cjs/Schema.js +593 -522
- package/dist/cjs/Schema.js.map +1 -1
- package/dist/cjs/TRef.js.map +1 -1
- package/dist/cjs/internal/fiberRuntime.js +4 -5
- package/dist/cjs/internal/fiberRuntime.js.map +1 -1
- package/dist/cjs/internal/stm/core.js +5 -5
- package/dist/cjs/internal/stm/core.js.map +1 -1
- package/dist/cjs/internal/stm/entry.js.map +1 -0
- package/dist/cjs/internal/stm/journal.js.map +1 -0
- package/dist/cjs/internal/stm/stm.js +2 -2
- package/dist/cjs/internal/stm/stm.js.map +1 -1
- package/dist/cjs/internal/stm/{stm/stmState.js → stmState.js} +7 -7
- package/dist/cjs/internal/stm/stmState.js.map +1 -0
- package/dist/cjs/internal/stm/{stm/tExit.js → tExit.js} +5 -5
- package/dist/cjs/internal/stm/tExit.js.map +1 -0
- package/dist/cjs/internal/stm/tMap.js.map +1 -1
- package/dist/cjs/internal/stm/tRef.js +2 -2
- package/dist/cjs/internal/stm/tRef.js.map +1 -1
- package/dist/cjs/internal/stm/{stm/tryCommit.js → tryCommit.js} +1 -1
- package/dist/cjs/internal/stm/tryCommit.js.map +1 -0
- package/dist/cjs/internal/stm/txnId.js.map +1 -0
- package/dist/cjs/internal/stm/versioned.js.map +1 -0
- package/dist/cjs/internal/version.js +1 -1
- package/dist/dts/Array.d.ts +6 -6
- package/dist/dts/Array.d.ts.map +1 -1
- package/dist/dts/Context.d.ts +1 -1
- package/dist/dts/Context.d.ts.map +1 -1
- package/dist/dts/FiberHandle.d.ts.map +1 -1
- package/dist/dts/FiberMap.d.ts.map +1 -1
- package/dist/dts/FiberSet.d.ts.map +1 -1
- package/dist/dts/Option.d.ts +3 -42
- package/dist/dts/Option.d.ts.map +1 -1
- package/dist/dts/ParseResult.d.ts.map +1 -1
- package/dist/dts/Schema.d.ts +400 -270
- package/dist/dts/Schema.d.ts.map +1 -1
- package/dist/dts/internal/stm/entry.d.ts.map +1 -0
- package/dist/dts/internal/stm/journal.d.ts.map +1 -0
- package/dist/dts/internal/stm/stmState.d.ts.map +1 -0
- package/dist/dts/internal/stm/tExit.d.ts.map +1 -0
- package/dist/dts/internal/stm/tryCommit.d.ts.map +1 -0
- package/dist/dts/internal/stm/txnId.d.ts.map +1 -0
- package/dist/dts/internal/stm/versioned.d.ts.map +1 -0
- package/dist/esm/FiberHandle.js +5 -3
- package/dist/esm/FiberHandle.js.map +1 -1
- package/dist/esm/FiberMap.js +5 -3
- package/dist/esm/FiberMap.js.map +1 -1
- package/dist/esm/FiberSet.js +6 -3
- package/dist/esm/FiberSet.js.map +1 -1
- package/dist/esm/JSONSchema.js +7 -7
- package/dist/esm/JSONSchema.js.map +1 -1
- package/dist/esm/Option.js +3 -15
- package/dist/esm/Option.js.map +1 -1
- package/dist/esm/ParseResult.js +1 -1
- package/dist/esm/ParseResult.js.map +1 -1
- package/dist/esm/Schema.js +538 -490
- package/dist/esm/Schema.js.map +1 -1
- package/dist/esm/TRef.js.map +1 -1
- package/dist/esm/internal/fiberRuntime.js +4 -5
- package/dist/esm/internal/fiberRuntime.js.map +1 -1
- package/dist/esm/internal/stm/core.js +5 -5
- package/dist/esm/internal/stm/core.js.map +1 -1
- package/dist/esm/internal/stm/entry.js.map +1 -0
- package/dist/esm/internal/stm/journal.js.map +1 -0
- package/dist/esm/internal/stm/stm.js +2 -2
- package/dist/esm/internal/stm/stm.js.map +1 -1
- package/dist/esm/internal/stm/{stm/stmState.js → stmState.js} +7 -7
- package/dist/esm/internal/stm/stmState.js.map +1 -0
- package/dist/esm/internal/stm/{stm/tExit.js → tExit.js} +5 -5
- package/dist/esm/internal/stm/tExit.js.map +1 -0
- package/dist/esm/internal/stm/tMap.js.map +1 -1
- package/dist/esm/internal/stm/tRef.js +2 -2
- package/dist/esm/internal/stm/tRef.js.map +1 -1
- package/dist/esm/internal/stm/{stm/tryCommit.js → tryCommit.js} +1 -1
- package/dist/esm/internal/stm/tryCommit.js.map +1 -0
- package/dist/esm/internal/stm/txnId.js.map +1 -0
- package/dist/esm/internal/stm/versioned.js.map +1 -0
- package/dist/esm/internal/version.js +1 -1
- package/package.json +1 -1
- package/src/Array.ts +6 -6
- package/src/Context.ts +1 -1
- package/src/FiberHandle.ts +11 -7
- package/src/FiberMap.ts +11 -7
- package/src/FiberSet.ts +9 -7
- package/src/JSONSchema.ts +7 -7
- package/src/Option.ts +7 -46
- package/src/ParseResult.ts +1 -3
- package/src/Schema.ts +1337 -1137
- package/src/TRef.ts +3 -3
- package/src/internal/fiberRuntime.ts +5 -4
- package/src/internal/stm/core.ts +5 -5
- package/src/internal/stm/{stm/entry.ts → entry.ts} +1 -1
- package/src/internal/stm/{stm/journal.ts → journal.ts} +1 -1
- package/src/internal/stm/stm.ts +2 -2
- package/src/internal/stm/{stm/stmState.ts → stmState.ts} +7 -7
- package/src/internal/stm/{stm/tExit.ts → tExit.ts} +7 -7
- package/src/internal/stm/tMap.ts +1 -1
- package/src/internal/stm/tRef.ts +4 -4
- package/src/internal/stm/{stm/tryCommit.ts → tryCommit.ts} +2 -2
- package/src/internal/version.ts +1 -1
- package/dist/cjs/internal/stm/stm/entry.js.map +0 -1
- package/dist/cjs/internal/stm/stm/journal.js.map +0 -1
- package/dist/cjs/internal/stm/stm/opCodes/stm.js +0 -31
- package/dist/cjs/internal/stm/stm/opCodes/stm.js.map +0 -1
- package/dist/cjs/internal/stm/stm/opCodes/stmState.js +0 -13
- package/dist/cjs/internal/stm/stm/opCodes/stmState.js.map +0 -1
- package/dist/cjs/internal/stm/stm/opCodes/strategy.js +0 -13
- package/dist/cjs/internal/stm/stm/opCodes/strategy.js.map +0 -1
- package/dist/cjs/internal/stm/stm/opCodes/tExit.js +0 -17
- package/dist/cjs/internal/stm/stm/opCodes/tExit.js.map +0 -1
- package/dist/cjs/internal/stm/stm/opCodes/tryCommit.js +0 -11
- package/dist/cjs/internal/stm/stm/opCodes/tryCommit.js.map +0 -1
- package/dist/cjs/internal/stm/stm/stmState.js.map +0 -1
- package/dist/cjs/internal/stm/stm/tExit.js.map +0 -1
- package/dist/cjs/internal/stm/stm/tryCommit.js.map +0 -1
- package/dist/cjs/internal/stm/stm/txnId.js.map +0 -1
- package/dist/cjs/internal/stm/stm/versioned.js.map +0 -1
- package/dist/dts/internal/stm/stm/entry.d.ts.map +0 -1
- package/dist/dts/internal/stm/stm/journal.d.ts.map +0 -1
- package/dist/dts/internal/stm/stm/opCodes/stm.d.ts +0 -2
- package/dist/dts/internal/stm/stm/opCodes/stm.d.ts.map +0 -1
- package/dist/dts/internal/stm/stm/opCodes/stmState.d.ts.map +0 -1
- package/dist/dts/internal/stm/stm/opCodes/strategy.d.ts +0 -2
- package/dist/dts/internal/stm/stm/opCodes/strategy.d.ts.map +0 -1
- package/dist/dts/internal/stm/stm/opCodes/tExit.d.ts +0 -2
- package/dist/dts/internal/stm/stm/opCodes/tExit.d.ts.map +0 -1
- package/dist/dts/internal/stm/stm/opCodes/tryCommit.d.ts.map +0 -1
- package/dist/dts/internal/stm/stm/stmState.d.ts +0 -2
- package/dist/dts/internal/stm/stm/stmState.d.ts.map +0 -1
- package/dist/dts/internal/stm/stm/tExit.d.ts.map +0 -1
- package/dist/dts/internal/stm/stm/tryCommit.d.ts +0 -2
- package/dist/dts/internal/stm/stm/tryCommit.d.ts.map +0 -1
- package/dist/dts/internal/stm/stm/txnId.d.ts.map +0 -1
- package/dist/dts/internal/stm/stm/versioned.d.ts.map +0 -1
- package/dist/esm/internal/stm/stm/entry.js.map +0 -1
- package/dist/esm/internal/stm/stm/journal.js.map +0 -1
- package/dist/esm/internal/stm/stm/opCodes/stm.js +0 -25
- package/dist/esm/internal/stm/stm/opCodes/stm.js.map +0 -1
- package/dist/esm/internal/stm/stm/opCodes/stmState.js +0 -7
- package/dist/esm/internal/stm/stm/opCodes/stmState.js.map +0 -1
- package/dist/esm/internal/stm/stm/opCodes/strategy.js +0 -7
- package/dist/esm/internal/stm/stm/opCodes/strategy.js.map +0 -1
- package/dist/esm/internal/stm/stm/opCodes/tExit.js +0 -11
- package/dist/esm/internal/stm/stm/opCodes/tExit.js.map +0 -1
- package/dist/esm/internal/stm/stm/opCodes/tryCommit.js +0 -5
- package/dist/esm/internal/stm/stm/opCodes/tryCommit.js.map +0 -1
- package/dist/esm/internal/stm/stm/stmState.js.map +0 -1
- package/dist/esm/internal/stm/stm/tExit.js.map +0 -1
- package/dist/esm/internal/stm/stm/tryCommit.js.map +0 -1
- package/dist/esm/internal/stm/stm/txnId.js.map +0 -1
- package/dist/esm/internal/stm/stm/versioned.js.map +0 -1
- package/src/internal/stm/stm/opCodes/stm.ts +0 -71
- package/src/internal/stm/stm/opCodes/stmState.ts +0 -17
- package/src/internal/stm/stm/opCodes/strategy.ts +0 -17
- package/src/internal/stm/stm/opCodes/tExit.ts +0 -29
- package/src/internal/stm/stm/opCodes/tryCommit.ts +0 -11
- /package/dist/cjs/internal/stm/{stm/entry.js → entry.js} +0 -0
- /package/dist/cjs/internal/stm/{stm/journal.js → journal.js} +0 -0
- /package/dist/cjs/internal/stm/{stm/txnId.js → txnId.js} +0 -0
- /package/dist/cjs/internal/stm/{stm/versioned.js → versioned.js} +0 -0
- /package/dist/dts/internal/stm/{stm/entry.d.ts → entry.d.ts} +0 -0
- /package/dist/dts/internal/stm/{stm/journal.d.ts → journal.d.ts} +0 -0
- /package/dist/dts/internal/stm/{stm/opCodes/stmState.d.ts → stmState.d.ts} +0 -0
- /package/dist/dts/internal/stm/{stm/tExit.d.ts → tExit.d.ts} +0 -0
- /package/dist/dts/internal/stm/{stm/opCodes/tryCommit.d.ts → tryCommit.d.ts} +0 -0
- /package/dist/dts/internal/stm/{stm/txnId.d.ts → txnId.d.ts} +0 -0
- /package/dist/dts/internal/stm/{stm/versioned.d.ts → versioned.d.ts} +0 -0
- /package/dist/esm/internal/stm/{stm/entry.js → entry.js} +0 -0
- /package/dist/esm/internal/stm/{stm/journal.js → journal.js} +0 -0
- /package/dist/esm/internal/stm/{stm/txnId.js → txnId.js} +0 -0
- /package/dist/esm/internal/stm/{stm/versioned.js → versioned.js} +0 -0
- /package/src/internal/stm/{stm/txnId.ts → txnId.ts} +0 -0
- /package/src/internal/stm/{stm/versioned.ts → versioned.ts} +0 -0
package/dist/dts/Schema.d.ts
CHANGED
|
@@ -68,6 +68,20 @@ export interface Schema<in out A, in out I = A, out R = never> extends Schema.Va
|
|
|
68
68
|
*/
|
|
69
69
|
annotations(annotations: Annotations.GenericSchema<A>): Schema<A, I, R>;
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* @category annotations
|
|
73
|
+
* @since 3.10.0
|
|
74
|
+
*/
|
|
75
|
+
export interface Annotable<Self extends Schema<A, I, R>, A, I = A, R = never> extends Schema<A, I, R> {
|
|
76
|
+
annotations(annotations: Annotations.GenericSchema<A>): Self;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @category annotations
|
|
80
|
+
* @since 3.10.0
|
|
81
|
+
*/
|
|
82
|
+
export interface AnnotableClass<Self extends Schema<A, I, R>, A, I = A, R = never> extends Annotable<Self, A, I, R> {
|
|
83
|
+
new (_: never): Schema.Variance<A, I, R>;
|
|
84
|
+
}
|
|
71
85
|
/**
|
|
72
86
|
* @category model
|
|
73
87
|
* @since 3.10.0
|
|
@@ -78,7 +92,7 @@ export interface SchemaClass<A, I = A, R = never> extends AnnotableClass<SchemaC
|
|
|
78
92
|
* @category constructors
|
|
79
93
|
* @since 3.10.0
|
|
80
94
|
*/
|
|
81
|
-
export declare
|
|
95
|
+
export declare function make<A, I = A, R = never>(ast: AST.AST): SchemaClass<A, I, R>;
|
|
82
96
|
/**
|
|
83
97
|
* Returns a "Standard Schema" object conforming to the [Standard Schema
|
|
84
98
|
* v1](https://standardschema.dev/) specification.
|
|
@@ -126,24 +140,10 @@ export declare namespace Annotable {
|
|
|
126
140
|
*/
|
|
127
141
|
type All = Any | Annotable<any, any, never, unknown> | Annotable<any, never, any, unknown> | Annotable<any, never, never, unknown>;
|
|
128
142
|
}
|
|
129
|
-
/**
|
|
130
|
-
* @category annotations
|
|
131
|
-
* @since 3.10.0
|
|
132
|
-
*/
|
|
133
|
-
export interface Annotable<Self extends Schema<A, I, R>, A, I = A, R = never> extends Schema<A, I, R> {
|
|
134
|
-
annotations(annotations: Annotations.GenericSchema<A>): Self;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* @category annotations
|
|
138
|
-
* @since 3.10.0
|
|
139
|
-
*/
|
|
140
|
-
export interface AnnotableClass<Self extends Schema<A, I, R>, A, I = A, R = never> extends Annotable<Self, A, I, R> {
|
|
141
|
-
new (_: never): Schema.Variance<A, I, R>;
|
|
142
|
-
}
|
|
143
143
|
/**
|
|
144
144
|
* @since 3.10.0
|
|
145
145
|
*/
|
|
146
|
-
export declare
|
|
146
|
+
export declare function asSchema<S extends Schema.All>(schema: S): Schema<Schema.Type<S>, Schema.Encoded<S>, Schema.Context<S>>;
|
|
147
147
|
/**
|
|
148
148
|
* @category formatting
|
|
149
149
|
* @since 3.10.0
|
|
@@ -395,7 +395,7 @@ export interface Literal<Literals extends array_.NonEmptyReadonlyArray<AST.Liter
|
|
|
395
395
|
*/
|
|
396
396
|
export declare function Literal<Literals extends array_.NonEmptyReadonlyArray<AST.LiteralValue>>(...literals: Literals): Literal<Literals>;
|
|
397
397
|
export declare function Literal(): Never;
|
|
398
|
-
export declare function Literal<Literals extends ReadonlyArray<AST.LiteralValue>>(...literals: Literals):
|
|
398
|
+
export declare function Literal<Literals extends ReadonlyArray<AST.LiteralValue>>(...literals: Literals): SchemaClass<Literals[number]>;
|
|
399
399
|
/**
|
|
400
400
|
* Creates a new `Schema` from a literal schema.
|
|
401
401
|
*
|
|
@@ -471,6 +471,20 @@ export interface TemplateLiteralParser<Params extends array_.NonEmptyReadonlyArr
|
|
|
471
471
|
* @since 3.10.0
|
|
472
472
|
*/
|
|
473
473
|
export declare const TemplateLiteralParser: <Params extends array_.NonEmptyReadonlyArray<TemplateLiteralParserParameters>>(...params: Params) => TemplateLiteralParser<Params>;
|
|
474
|
+
/**
|
|
475
|
+
* @category api interface
|
|
476
|
+
* @since 3.13.3
|
|
477
|
+
*/
|
|
478
|
+
export interface declare<A, I = A, P extends ReadonlyArray<Schema.All> = readonly [], R = Schema.Context<P[number]>> extends AnnotableClass<declare<A, I, P, R>, A, I, R> {
|
|
479
|
+
readonly typeParameters: Readonly<P>;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* @category api interface
|
|
483
|
+
* @since 3.13.3
|
|
484
|
+
*/
|
|
485
|
+
export interface AnnotableDeclare<Self extends declare<A, I, P, R>, A, I = A, P extends ReadonlyArray<Schema.All> = readonly [], R = Schema.Context<P[number]>> extends declare<A, I, P, R> {
|
|
486
|
+
annotations(annotations: Annotations.Schema<A>): Self;
|
|
487
|
+
}
|
|
474
488
|
/**
|
|
475
489
|
* The constraint `R extends Schema.Context<P[number]>` enforces dependencies solely from `typeParameters`.
|
|
476
490
|
* This ensures that when you call `Schema.to` or `Schema.from`, you receive a schema with a `never` context.
|
|
@@ -486,7 +500,7 @@ export declare const declare: {
|
|
|
486
500
|
* @category constructors
|
|
487
501
|
* @since 3.10.0
|
|
488
502
|
*/
|
|
489
|
-
<A>(is: (input: unknown) => input is A, annotations?: Annotations.Schema<A>):
|
|
503
|
+
<A>(is: (input: unknown) => input is A, annotations?: Annotations.Schema<A>): declare<A>;
|
|
490
504
|
/**
|
|
491
505
|
* The constraint `R extends Schema.Context<P[number]>` enforces dependencies solely from `typeParameters`.
|
|
492
506
|
* This ensures that when you call `Schema.to` or `Schema.from`, you receive a schema with a `never` context.
|
|
@@ -494,7 +508,7 @@ export declare const declare: {
|
|
|
494
508
|
* @category constructors
|
|
495
509
|
* @since 3.10.0
|
|
496
510
|
*/
|
|
497
|
-
<const P extends ReadonlyArray<Schema.All
|
|
511
|
+
<A, I, const P extends ReadonlyArray<Schema.All>>(typeParameters: P, options: {
|
|
498
512
|
readonly decode: (...typeParameters: {
|
|
499
513
|
readonly [K in keyof P]: Schema<Schema.Type<P[K]>, Schema.Encoded<P[K]>, never>;
|
|
500
514
|
}) => (input: unknown, options: ParseOptions, ast: AST.Declaration) => Effect.Effect<A, ParseResult.ParseIssue, never>;
|
|
@@ -503,7 +517,7 @@ export declare const declare: {
|
|
|
503
517
|
}) => (input: unknown, options: ParseOptions, ast: AST.Declaration) => Effect.Effect<I, ParseResult.ParseIssue, never>;
|
|
504
518
|
}, annotations?: Annotations.Schema<A, {
|
|
505
519
|
readonly [K in keyof P]: Schema.Type<P[K]>;
|
|
506
|
-
}>):
|
|
520
|
+
}>): declare<A, I, P>;
|
|
507
521
|
};
|
|
508
522
|
/**
|
|
509
523
|
* @category schema id
|
|
@@ -524,7 +538,7 @@ export declare const InstanceOfSchemaId: unique symbol;
|
|
|
524
538
|
* @category api interface
|
|
525
539
|
* @since 3.10.0
|
|
526
540
|
*/
|
|
527
|
-
export interface instanceOf<A> extends
|
|
541
|
+
export interface instanceOf<A> extends AnnotableDeclare<instanceOf<A>, A> {
|
|
528
542
|
}
|
|
529
543
|
/**
|
|
530
544
|
* @category constructors
|
|
@@ -630,7 +644,6 @@ String$ as String };
|
|
|
630
644
|
*/
|
|
631
645
|
export interface Union<Members extends ReadonlyArray<Schema.All>> extends AnnotableClass<Union<Members>, Schema.Type<Members[number]>, Schema.Encoded<Members[number]>, Schema.Context<Members[number]>> {
|
|
632
646
|
readonly members: Readonly<Members>;
|
|
633
|
-
annotations(annotations: Annotations.Schema<Schema.Type<Members[number]>>): Union<Members>;
|
|
634
647
|
}
|
|
635
648
|
/**
|
|
636
649
|
* @category combinators
|
|
@@ -770,11 +783,20 @@ export interface TupleType<Elements extends TupleType.Elements, Rest extends Tup
|
|
|
770
783
|
export interface Tuple<Elements extends TupleType.Elements> extends TupleType<Elements, []> {
|
|
771
784
|
annotations(annotations: Annotations.Schema<TupleType.Type<Elements, []>>): Tuple<Elements>;
|
|
772
785
|
}
|
|
786
|
+
/**
|
|
787
|
+
* @category api interface
|
|
788
|
+
* @since 3.13.3
|
|
789
|
+
*/
|
|
790
|
+
export interface Tuple2<Fst extends Schema.Any, Snd extends Schema.Any> extends AnnotableClass<Tuple2<Fst, Snd>, readonly [Schema.Type<Fst>, Schema.Type<Snd>], readonly [Schema.Encoded<Fst>, Schema.Encoded<Snd>], Schema.Context<Fst> | Schema.Context<Snd>> {
|
|
791
|
+
readonly elements: readonly [Fst, Snd];
|
|
792
|
+
readonly rest: readonly [];
|
|
793
|
+
}
|
|
773
794
|
/**
|
|
774
795
|
* @category constructors
|
|
775
796
|
* @since 3.10.0
|
|
776
797
|
*/
|
|
777
798
|
export declare function Tuple<const Elements extends TupleType.Elements, Rest extends array_.NonEmptyReadonlyArray<TupleType.Rest[number]>>(elements: Elements, ...rest: Rest): TupleType<Elements, Rest>;
|
|
799
|
+
export declare function Tuple<Fst extends Schema.Any, Snd extends Schema.Any>(fst: Fst, snd: Snd): Tuple2<Fst, Snd>;
|
|
778
800
|
export declare function Tuple<Elements extends TupleType.Elements>(...elements: Elements): Tuple<Elements>;
|
|
779
801
|
/**
|
|
780
802
|
* @category api interface
|
|
@@ -795,9 +817,10 @@ Array$ as Array };
|
|
|
795
817
|
* @category api interface
|
|
796
818
|
* @since 3.10.0
|
|
797
819
|
*/
|
|
798
|
-
export interface NonEmptyArray<Value extends Schema.Any> extends
|
|
820
|
+
export interface NonEmptyArray<Value extends Schema.Any> extends AnnotableClass<NonEmptyArray<Value>, array_.NonEmptyReadonlyArray<Schema.Type<Value>>, array_.NonEmptyReadonlyArray<Schema.Encoded<Value>>, Schema.Context<Value>> {
|
|
821
|
+
readonly elements: readonly [Value];
|
|
822
|
+
readonly rest: readonly [Value];
|
|
799
823
|
readonly value: Value;
|
|
800
|
-
annotations(annotations: Annotations.Schema<TupleType.Type<[Value], [Value]>>): NonEmptyArray<Value>;
|
|
801
824
|
}
|
|
802
825
|
/**
|
|
803
826
|
* @category constructors
|
|
@@ -808,24 +831,24 @@ export declare const NonEmptyArray: <Value extends Schema.Any>(value: Value) =>
|
|
|
808
831
|
* @category api interface
|
|
809
832
|
* @since 3.10.0
|
|
810
833
|
*/
|
|
811
|
-
export interface ArrayEnsure<Value extends Schema.Any> extends
|
|
834
|
+
export interface ArrayEnsure<Value extends Schema.Any> extends transform<Union<[Value, Array$<Value>]>, Array$<SchemaClass<Schema.Type<Value>>>> {
|
|
812
835
|
}
|
|
813
836
|
/**
|
|
814
837
|
* @category constructors
|
|
815
838
|
* @since 3.10.0
|
|
816
839
|
*/
|
|
817
|
-
export declare
|
|
840
|
+
export declare function ArrayEnsure<Value extends Schema.Any>(value: Value): ArrayEnsure<Value>;
|
|
818
841
|
/**
|
|
819
842
|
* @category api interface
|
|
820
843
|
* @since 3.10.0
|
|
821
844
|
*/
|
|
822
|
-
export interface NonEmptyArrayEnsure<Value extends Schema.Any> extends
|
|
845
|
+
export interface NonEmptyArrayEnsure<Value extends Schema.Any> extends transform<Union<[Value, NonEmptyArray<Value>]>, NonEmptyArray<SchemaClass<Schema.Type<Value>>>> {
|
|
823
846
|
}
|
|
824
847
|
/**
|
|
825
848
|
* @category constructors
|
|
826
849
|
* @since 3.10.0
|
|
827
850
|
*/
|
|
828
|
-
export declare
|
|
851
|
+
export declare function NonEmptyArrayEnsure<Value extends Schema.Any>(value: Value): NonEmptyArrayEnsure<Value>;
|
|
829
852
|
/**
|
|
830
853
|
* @since 3.10.0
|
|
831
854
|
*/
|
|
@@ -1190,31 +1213,29 @@ export declare namespace Struct {
|
|
|
1190
1213
|
type Fields = {
|
|
1191
1214
|
readonly [x: PropertyKey]: Schema.All | PropertySignature.All;
|
|
1192
1215
|
};
|
|
1193
|
-
type
|
|
1194
|
-
type
|
|
1195
|
-
[K in keyof Fields]: Fields[K] extends
|
|
1196
|
-
}[keyof Fields];
|
|
1197
|
-
type TypeTokenKeys<Fields extends Struct.Fields> = {
|
|
1198
|
-
[K in keyof Fields]: Fields[K] extends OptionalPropertySignature ? K : never;
|
|
1216
|
+
type OptionalEncodedPropertySignature = PropertySignature<PropertySignature.Token, any, PropertyKey, "?:", any, boolean, unknown> | PropertySignature<PropertySignature.Token, any, PropertyKey, "?:", never, boolean, unknown> | PropertySignature<PropertySignature.Token, never, PropertyKey, "?:", any, boolean, unknown> | PropertySignature<PropertySignature.Token, never, PropertyKey, "?:", never, boolean, unknown>;
|
|
1217
|
+
type EncodedOptionalKeys<Fields extends Struct.Fields> = {
|
|
1218
|
+
[K in keyof Fields]: Fields[K] extends OptionalEncodedPropertySignature ? K : never;
|
|
1199
1219
|
}[keyof Fields];
|
|
1200
|
-
type
|
|
1220
|
+
type OptionalTypePropertySignature = PropertySignature<"?:", any, PropertyKey, PropertySignature.Token, any, boolean, unknown> | PropertySignature<"?:", any, PropertyKey, PropertySignature.Token, never, boolean, unknown> | PropertySignature<"?:", never, PropertyKey, PropertySignature.Token, any, boolean, unknown> | PropertySignature<"?:", never, PropertyKey, PropertySignature.Token, never, boolean, unknown>;
|
|
1201
1221
|
/**
|
|
1202
1222
|
* @since 3.10.0
|
|
1203
1223
|
*/
|
|
1204
1224
|
type Type<F extends Fields> = Types.UnionToIntersection<{
|
|
1205
|
-
[K in keyof F]: F[K] extends
|
|
1225
|
+
[K in keyof F]: F[K] extends OptionalTypePropertySignature ? {
|
|
1206
1226
|
readonly [H in K]?: Schema.Type<F[H]>;
|
|
1207
1227
|
} : {
|
|
1208
1228
|
readonly [h in K]: Schema.Type<F[h]>;
|
|
1209
1229
|
};
|
|
1210
1230
|
}[keyof F]> extends infer Q ? Q : never;
|
|
1231
|
+
type Key<F extends Fields, K extends keyof F> = [K] extends [never] ? never : F[K] extends PropertySignature.All<infer Key> ? [Key] extends [never] ? K : Key : K;
|
|
1211
1232
|
/**
|
|
1212
1233
|
* @since 3.10.0
|
|
1213
1234
|
*/
|
|
1214
1235
|
type Encoded<F extends Fields> = {
|
|
1215
|
-
readonly [K in Exclude<keyof F,
|
|
1236
|
+
readonly [K in Exclude<keyof F, EncodedOptionalKeys<F>> as Key<F, K>]: Schema.Encoded<F[K]>;
|
|
1216
1237
|
} & {
|
|
1217
|
-
readonly [K in
|
|
1238
|
+
readonly [K in EncodedOptionalKeys<F> as Key<F, K>]?: Schema.Encoded<F[K]>;
|
|
1218
1239
|
};
|
|
1219
1240
|
/**
|
|
1220
1241
|
* @since 3.10.0
|
|
@@ -1225,7 +1246,7 @@ export declare namespace Struct {
|
|
|
1225
1246
|
* @since 3.10.0
|
|
1226
1247
|
*/
|
|
1227
1248
|
type Constructor<F extends Fields> = Types.UnionToIntersection<{
|
|
1228
|
-
[K in keyof F]: F[K] extends
|
|
1249
|
+
[K in keyof F]: F[K] extends OptionalTypePropertySignature ? {
|
|
1229
1250
|
readonly [H in K]?: Schema.Type<F[H]>;
|
|
1230
1251
|
} : F[K] extends PropertySignatureWithDefault ? {
|
|
1231
1252
|
readonly [H in K]?: Schema.Type<F[H]>;
|
|
@@ -1471,7 +1492,7 @@ export declare const pluck: {
|
|
|
1471
1492
|
* @category struct transformations
|
|
1472
1493
|
* @since 3.10.0
|
|
1473
1494
|
*/
|
|
1474
|
-
<A, I, K extends keyof A & keyof I>(key: K): <R>(schema: Schema<A, I, R>) =>
|
|
1495
|
+
<A, I, K extends keyof A & keyof I>(key: K): <R>(schema: Schema<A, I, R>) => SchemaClass<A[K], Simplify<Pick<I, K>>, R>;
|
|
1475
1496
|
/**
|
|
1476
1497
|
* Given a schema `Schema<A, I, R>` and a key `key: K`, this function extracts a specific field from the `A` type,
|
|
1477
1498
|
* producing a new schema that represents a transformation from the `{ readonly [key]: I[K] }` type to `A[K]`.
|
|
@@ -1502,7 +1523,7 @@ export declare const pluck: {
|
|
|
1502
1523
|
* @category struct transformations
|
|
1503
1524
|
* @since 3.10.0
|
|
1504
1525
|
*/
|
|
1505
|
-
<A, I, R, K extends keyof A & keyof I>(schema: Schema<A, I, R>, key: K):
|
|
1526
|
+
<A, I, R, K extends keyof A & keyof I>(schema: Schema<A, I, R>, key: K): SchemaClass<A[K], Simplify<Pick<I, K>>, R>;
|
|
1506
1527
|
};
|
|
1507
1528
|
/**
|
|
1508
1529
|
* @category branding
|
|
@@ -1516,6 +1537,7 @@ export interface BrandSchema<A extends Brand<any>, I = A, R = never> extends Ann
|
|
|
1516
1537
|
* @since 3.10.0
|
|
1517
1538
|
*/
|
|
1518
1539
|
export interface brand<S extends Schema.Any, B extends string | symbol> extends BrandSchema<Schema.Type<S> & Brand<B>, Schema.Encoded<S>, Schema.Context<S>> {
|
|
1540
|
+
readonly from: S;
|
|
1519
1541
|
annotations(annotations: Annotations.Schema<Schema.Type<S> & Brand<B>>): brand<S, B>;
|
|
1520
1542
|
}
|
|
1521
1543
|
/**
|
|
@@ -1741,50 +1763,50 @@ export declare const compose: {
|
|
|
1741
1763
|
* @category combinators
|
|
1742
1764
|
* @since 3.10.0
|
|
1743
1765
|
*/
|
|
1744
|
-
<
|
|
1766
|
+
<To extends Schema.Any, From extends Schema.Any, C extends Schema.Type<From>>(to: To & Schema<Schema.Type<To>, C, Schema.Context<To>>): (from: From) => transform<From, To>;
|
|
1745
1767
|
/**
|
|
1746
1768
|
* @category combinators
|
|
1747
1769
|
* @since 3.10.0
|
|
1748
1770
|
*/
|
|
1749
|
-
<
|
|
1771
|
+
<To extends Schema.Any>(to: To): <From extends Schema.Any, B extends Schema.Encoded<To>>(from: From & Schema<B, Schema.Encoded<From>, Schema.Context<From>>) => transform<From, To>;
|
|
1750
1772
|
/**
|
|
1751
1773
|
* @category combinators
|
|
1752
1774
|
* @since 3.10.0
|
|
1753
1775
|
*/
|
|
1754
|
-
<
|
|
1776
|
+
<To extends Schema.Any>(to: To, options?: {
|
|
1755
1777
|
readonly strict: true;
|
|
1756
|
-
}): <
|
|
1778
|
+
}): <From extends Schema.Any>(from: From & Schema<Schema.Encoded<To>, Schema.Encoded<From>, Schema.Context<From>>) => transform<From, To>;
|
|
1757
1779
|
/**
|
|
1758
1780
|
* @category combinators
|
|
1759
1781
|
* @since 3.10.0
|
|
1760
1782
|
*/
|
|
1761
|
-
<
|
|
1783
|
+
<To extends Schema.Any>(to: To, options: {
|
|
1762
1784
|
readonly strict: false;
|
|
1763
|
-
}): <
|
|
1785
|
+
}): <From extends Schema.Any>(from: From) => transform<From, To>;
|
|
1764
1786
|
/**
|
|
1765
1787
|
* @category combinators
|
|
1766
1788
|
* @since 3.10.0
|
|
1767
1789
|
*/
|
|
1768
|
-
<
|
|
1790
|
+
<From extends Schema.Any, To extends Schema.Any, C extends Schema.Type<From>>(from: From, to: To & Schema<Schema.Type<To>, C, Schema.Context<To>>): transform<From, To>;
|
|
1769
1791
|
/**
|
|
1770
1792
|
* @category combinators
|
|
1771
1793
|
* @since 3.10.0
|
|
1772
1794
|
*/
|
|
1773
|
-
<
|
|
1795
|
+
<From extends Schema.Any, B extends Schema.Encoded<To>, To extends Schema.Any>(from: From & Schema<B, Schema.Encoded<From>, Schema.Context<From>>, to: To): transform<From, To>;
|
|
1774
1796
|
/**
|
|
1775
1797
|
* @category combinators
|
|
1776
1798
|
* @since 3.10.0
|
|
1777
1799
|
*/
|
|
1778
|
-
<
|
|
1800
|
+
<From extends Schema.Any, To extends Schema.Any>(from: From & Schema<Schema.Encoded<To>, Schema.Encoded<From>, Schema.Context<From>>, to: To, options?: {
|
|
1779
1801
|
readonly strict: true;
|
|
1780
|
-
}):
|
|
1802
|
+
}): transform<From, To>;
|
|
1781
1803
|
/**
|
|
1782
1804
|
* @category combinators
|
|
1783
1805
|
* @since 3.10.0
|
|
1784
1806
|
*/
|
|
1785
|
-
<
|
|
1807
|
+
<From extends Schema.Any, To extends Schema.Any>(from: From, to: To, options: {
|
|
1786
1808
|
readonly strict: false;
|
|
1787
|
-
}):
|
|
1809
|
+
}): transform<From, To>;
|
|
1788
1810
|
};
|
|
1789
1811
|
/**
|
|
1790
1812
|
* @category api interface
|
|
@@ -1871,7 +1893,7 @@ export declare const filterEffect: {
|
|
|
1871
1893
|
* @category api interface
|
|
1872
1894
|
* @since 3.10.0
|
|
1873
1895
|
*/
|
|
1874
|
-
export interface transformOrFail<From extends Schema.
|
|
1896
|
+
export interface transformOrFail<From extends Schema.All, To extends Schema.All, R = never> extends AnnotableClass<transformOrFail<From, To, R>, Schema.Type<To>, Schema.Encoded<From>, Schema.Context<From> | Schema.Context<To> | R> {
|
|
1875
1897
|
readonly from: From;
|
|
1876
1898
|
readonly to: To;
|
|
1877
1899
|
}
|
|
@@ -1920,7 +1942,7 @@ export declare const transformOrFail: {
|
|
|
1920
1942
|
* @category api interface
|
|
1921
1943
|
* @since 3.10.0
|
|
1922
1944
|
*/
|
|
1923
|
-
export interface transform<From extends Schema.
|
|
1945
|
+
export interface transform<From extends Schema.All, To extends Schema.All> extends transformOrFail<From, To> {
|
|
1924
1946
|
annotations(annotations: Annotations.Schema<Schema.Type<To>>): transform<From, To>;
|
|
1925
1947
|
}
|
|
1926
1948
|
/**
|
|
@@ -1968,7 +1990,8 @@ export declare const transform: {
|
|
|
1968
1990
|
* @category api interface
|
|
1969
1991
|
* @since 3.10.0
|
|
1970
1992
|
*/
|
|
1971
|
-
export interface transformLiteral<Type, Encoded> extends
|
|
1993
|
+
export interface transformLiteral<Type extends AST.LiteralValue, Encoded extends AST.LiteralValue> extends transform<Literal<[Encoded]>, Literal<[Type]>> {
|
|
1994
|
+
annotations(annotations: Annotations.Schema<Type>): transformLiteral<Type, Encoded>;
|
|
1972
1995
|
}
|
|
1973
1996
|
/**
|
|
1974
1997
|
* Creates a new `Schema` which transforms literal values.
|
|
@@ -1985,7 +2008,7 @@ export interface transformLiteral<Type, Encoded> extends Annotable<transformLite
|
|
|
1985
2008
|
* @category constructors
|
|
1986
2009
|
* @since 3.10.0
|
|
1987
2010
|
*/
|
|
1988
|
-
export declare
|
|
2011
|
+
export declare function transformLiteral<Encoded extends AST.LiteralValue, Type extends AST.LiteralValue>(from: Encoded, to: Type): transformLiteral<Type, Encoded>;
|
|
1989
2012
|
/**
|
|
1990
2013
|
* Creates a new `Schema` which maps between corresponding literal values.
|
|
1991
2014
|
*
|
|
@@ -2225,7 +2248,7 @@ export declare const TrimmedSchemaId: unique symbol;
|
|
|
2225
2248
|
* @category string filters
|
|
2226
2249
|
* @since 3.10.0
|
|
2227
2250
|
*/
|
|
2228
|
-
export declare const trimmed: <
|
|
2251
|
+
export declare const trimmed: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2229
2252
|
/**
|
|
2230
2253
|
* @category schema id
|
|
2231
2254
|
* @since 3.10.0
|
|
@@ -2240,7 +2263,7 @@ export type MaxLengthSchemaId = typeof MaxLengthSchemaId;
|
|
|
2240
2263
|
* @category string filters
|
|
2241
2264
|
* @since 3.10.0
|
|
2242
2265
|
*/
|
|
2243
|
-
export declare const maxLength: <
|
|
2266
|
+
export declare const maxLength: <S extends Schema.Any>(maxLength: number, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2244
2267
|
/**
|
|
2245
2268
|
* @category schema id
|
|
2246
2269
|
* @since 3.10.0
|
|
@@ -2255,7 +2278,25 @@ export type MinLengthSchemaId = typeof MinLengthSchemaId;
|
|
|
2255
2278
|
* @category string filters
|
|
2256
2279
|
* @since 3.10.0
|
|
2257
2280
|
*/
|
|
2258
|
-
export declare const minLength: <
|
|
2281
|
+
export declare const minLength: <S extends Schema.Any>(minLength: number, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2282
|
+
/**
|
|
2283
|
+
* @category schema id
|
|
2284
|
+
* @since 3.10.0
|
|
2285
|
+
*/
|
|
2286
|
+
export declare const LengthSchemaId: unique symbol;
|
|
2287
|
+
/**
|
|
2288
|
+
* @category schema id
|
|
2289
|
+
* @since 3.10.0
|
|
2290
|
+
*/
|
|
2291
|
+
export type LengthSchemaId = typeof LengthSchemaId;
|
|
2292
|
+
/**
|
|
2293
|
+
* @category string filters
|
|
2294
|
+
* @since 3.10.0
|
|
2295
|
+
*/
|
|
2296
|
+
export declare const length: <S extends Schema.Any>(length: number | {
|
|
2297
|
+
readonly min: number;
|
|
2298
|
+
readonly max: number;
|
|
2299
|
+
}, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2259
2300
|
/**
|
|
2260
2301
|
* @category schema id
|
|
2261
2302
|
* @since 3.10.0
|
|
@@ -2265,7 +2306,7 @@ export declare const PatternSchemaId: unique symbol;
|
|
|
2265
2306
|
* @category string filters
|
|
2266
2307
|
* @since 3.10.0
|
|
2267
2308
|
*/
|
|
2268
|
-
export declare const pattern: <
|
|
2309
|
+
export declare const pattern: <S extends Schema.Any>(regex: RegExp, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2269
2310
|
/**
|
|
2270
2311
|
* @category schema id
|
|
2271
2312
|
* @since 3.10.0
|
|
@@ -2275,7 +2316,7 @@ export declare const StartsWithSchemaId: unique symbol;
|
|
|
2275
2316
|
* @category string filters
|
|
2276
2317
|
* @since 3.10.0
|
|
2277
2318
|
*/
|
|
2278
|
-
export declare const startsWith: <
|
|
2319
|
+
export declare const startsWith: <S extends Schema.Any>(startsWith: string, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2279
2320
|
/**
|
|
2280
2321
|
* @category schema id
|
|
2281
2322
|
* @since 3.10.0
|
|
@@ -2285,7 +2326,7 @@ export declare const EndsWithSchemaId: unique symbol;
|
|
|
2285
2326
|
* @category string filters
|
|
2286
2327
|
* @since 3.10.0
|
|
2287
2328
|
*/
|
|
2288
|
-
export declare const endsWith: <
|
|
2329
|
+
export declare const endsWith: <S extends Schema.Any>(endsWith: string, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2289
2330
|
/**
|
|
2290
2331
|
* @category schema id
|
|
2291
2332
|
* @since 3.10.0
|
|
@@ -2295,7 +2336,7 @@ export declare const IncludesSchemaId: unique symbol;
|
|
|
2295
2336
|
* @category string filters
|
|
2296
2337
|
* @since 3.10.0
|
|
2297
2338
|
*/
|
|
2298
|
-
export declare const includes: <
|
|
2339
|
+
export declare const includes: <S extends Schema.Any>(searchString: string, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2299
2340
|
/**
|
|
2300
2341
|
* @category schema id
|
|
2301
2342
|
* @since 3.10.0
|
|
@@ -2307,8 +2348,8 @@ export declare const LowercasedSchemaId: unique symbol;
|
|
|
2307
2348
|
* @category string filters
|
|
2308
2349
|
* @since 3.10.0
|
|
2309
2350
|
*/
|
|
2310
|
-
export declare const lowercased: <
|
|
2311
|
-
declare const Lowercased_base: filter<
|
|
2351
|
+
export declare const lowercased: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2352
|
+
declare const Lowercased_base: filter<typeof String$>;
|
|
2312
2353
|
/**
|
|
2313
2354
|
* @category string constructors
|
|
2314
2355
|
* @since 3.10.0
|
|
@@ -2319,78 +2360,60 @@ export declare class Lowercased extends Lowercased_base {
|
|
|
2319
2360
|
* @category schema id
|
|
2320
2361
|
* @since 3.10.0
|
|
2321
2362
|
*/
|
|
2322
|
-
export declare const
|
|
2363
|
+
export declare const UppercasedSchemaId: unique symbol;
|
|
2323
2364
|
/**
|
|
2324
|
-
* Verifies that a string is
|
|
2365
|
+
* Verifies that a string is uppercased.
|
|
2325
2366
|
*
|
|
2326
2367
|
* @category string filters
|
|
2327
2368
|
* @since 3.10.0
|
|
2328
2369
|
*/
|
|
2329
|
-
export declare const
|
|
2330
|
-
declare const
|
|
2370
|
+
export declare const uppercased: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2371
|
+
declare const Uppercased_base: filter<typeof String$>;
|
|
2331
2372
|
/**
|
|
2332
2373
|
* @category string constructors
|
|
2333
2374
|
* @since 3.10.0
|
|
2334
2375
|
*/
|
|
2335
|
-
export declare class
|
|
2376
|
+
export declare class Uppercased extends Uppercased_base {
|
|
2336
2377
|
}
|
|
2337
2378
|
/**
|
|
2338
2379
|
* @category schema id
|
|
2339
2380
|
* @since 3.10.0
|
|
2340
2381
|
*/
|
|
2341
|
-
export declare const
|
|
2382
|
+
export declare const CapitalizedSchemaId: unique symbol;
|
|
2342
2383
|
/**
|
|
2343
|
-
* Verifies that a string is
|
|
2384
|
+
* Verifies that a string is capitalized.
|
|
2344
2385
|
*
|
|
2345
2386
|
* @category string filters
|
|
2346
2387
|
* @since 3.10.0
|
|
2347
2388
|
*/
|
|
2348
|
-
export declare const
|
|
2349
|
-
declare const
|
|
2389
|
+
export declare const capitalized: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2390
|
+
declare const Capitalized_base: filter<typeof String$>;
|
|
2350
2391
|
/**
|
|
2351
2392
|
* @category string constructors
|
|
2352
2393
|
* @since 3.10.0
|
|
2353
2394
|
*/
|
|
2354
|
-
export declare class
|
|
2395
|
+
export declare class Capitalized extends Capitalized_base {
|
|
2355
2396
|
}
|
|
2356
2397
|
/**
|
|
2357
2398
|
* @category schema id
|
|
2358
2399
|
* @since 3.10.0
|
|
2359
2400
|
*/
|
|
2360
|
-
export declare const
|
|
2401
|
+
export declare const UncapitalizedSchemaId: unique symbol;
|
|
2361
2402
|
/**
|
|
2362
|
-
* Verifies that a string is
|
|
2403
|
+
* Verifies that a string is uncapitalized.
|
|
2363
2404
|
*
|
|
2364
2405
|
* @category string filters
|
|
2365
2406
|
* @since 3.10.0
|
|
2366
2407
|
*/
|
|
2367
|
-
export declare const
|
|
2368
|
-
declare const
|
|
2408
|
+
export declare const uncapitalized: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2409
|
+
declare const Uncapitalized_base: filter<typeof String$>;
|
|
2369
2410
|
/**
|
|
2370
2411
|
* @category string constructors
|
|
2371
2412
|
* @since 3.10.0
|
|
2372
2413
|
*/
|
|
2373
|
-
export declare class
|
|
2414
|
+
export declare class Uncapitalized extends Uncapitalized_base {
|
|
2374
2415
|
}
|
|
2375
|
-
|
|
2376
|
-
* @category schema id
|
|
2377
|
-
* @since 3.10.0
|
|
2378
|
-
*/
|
|
2379
|
-
export declare const LengthSchemaId: unique symbol;
|
|
2380
|
-
/**
|
|
2381
|
-
* @category schema id
|
|
2382
|
-
* @since 3.10.0
|
|
2383
|
-
*/
|
|
2384
|
-
export type LengthSchemaId = typeof LengthSchemaId;
|
|
2385
|
-
/**
|
|
2386
|
-
* @category string filters
|
|
2387
|
-
* @since 3.10.0
|
|
2388
|
-
*/
|
|
2389
|
-
export declare const length: <A extends string>(length: number | {
|
|
2390
|
-
readonly min: number;
|
|
2391
|
-
readonly max: number;
|
|
2392
|
-
}, annotations?: Annotations.Filter<A>) => <I, R>(self: Schema<A, I, R>) => filter<Schema<A, I, R>>;
|
|
2393
|
-
declare const Char_base: filter<Schema<string, string, never>>;
|
|
2416
|
+
declare const Char_base: filter<typeof String$>;
|
|
2394
2417
|
/**
|
|
2395
2418
|
* A schema representing a single character.
|
|
2396
2419
|
*
|
|
@@ -2403,7 +2426,7 @@ export declare class Char extends Char_base {
|
|
|
2403
2426
|
* @category string filters
|
|
2404
2427
|
* @since 3.10.0
|
|
2405
2428
|
*/
|
|
2406
|
-
export declare const nonEmptyString: <
|
|
2429
|
+
export declare const nonEmptyString: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2407
2430
|
declare const Lowercase_base: transform<SchemaClass<string, string, never>, typeof Lowercased>;
|
|
2408
2431
|
/**
|
|
2409
2432
|
* This schema converts a string to lowercase.
|
|
@@ -2440,14 +2463,14 @@ declare const Uncapitalize_base: transform<SchemaClass<string, string, never>, t
|
|
|
2440
2463
|
*/
|
|
2441
2464
|
export declare class Uncapitalize extends Uncapitalize_base {
|
|
2442
2465
|
}
|
|
2443
|
-
declare const Trimmed_base: filter<
|
|
2466
|
+
declare const Trimmed_base: filter<typeof String$>;
|
|
2444
2467
|
/**
|
|
2445
2468
|
* @category string constructors
|
|
2446
2469
|
* @since 3.10.0
|
|
2447
2470
|
*/
|
|
2448
2471
|
export declare class Trimmed extends Trimmed_base {
|
|
2449
2472
|
}
|
|
2450
|
-
declare const NonEmptyTrimmedString_base: filter<
|
|
2473
|
+
declare const NonEmptyTrimmedString_base: filter<typeof Trimmed>;
|
|
2451
2474
|
/**
|
|
2452
2475
|
* Useful for validating strings that must contain meaningful characters without
|
|
2453
2476
|
* leading or trailing whitespace.
|
|
@@ -2481,7 +2504,7 @@ export declare class Trim extends Trim_base {
|
|
|
2481
2504
|
* @category string transformations
|
|
2482
2505
|
* @since 3.10.0
|
|
2483
2506
|
*/
|
|
2484
|
-
export declare const split: (separator: string) => transform<
|
|
2507
|
+
export declare const split: (separator: string) => transform<SchemaClass<string>, Array$<typeof String$>>;
|
|
2485
2508
|
/**
|
|
2486
2509
|
* @since 3.10.0
|
|
2487
2510
|
*/
|
|
@@ -2529,7 +2552,7 @@ export declare const parseJson: {
|
|
|
2529
2552
|
* @category string transformations
|
|
2530
2553
|
* @since 3.10.0
|
|
2531
2554
|
*/
|
|
2532
|
-
<
|
|
2555
|
+
<S extends Schema.Any>(schema: S, options?: ParseJsonOptions): transform<SchemaClass<unknown, string>, S>;
|
|
2533
2556
|
/**
|
|
2534
2557
|
* The `ParseJson` combinator provides a method to convert JSON strings into the `unknown` type using the underlying
|
|
2535
2558
|
* functionality of `JSON.parse`. It also utilizes `JSON.stringify` for encoding.
|
|
@@ -2551,7 +2574,7 @@ export declare const parseJson: {
|
|
|
2551
2574
|
*/
|
|
2552
2575
|
(options?: ParseJsonOptions): SchemaClass<unknown, string>;
|
|
2553
2576
|
};
|
|
2554
|
-
declare const NonEmptyString_base: filter<
|
|
2577
|
+
declare const NonEmptyString_base: filter<typeof String$>;
|
|
2555
2578
|
/**
|
|
2556
2579
|
* @category string constructors
|
|
2557
2580
|
* @since 3.10.0
|
|
@@ -2563,7 +2586,7 @@ export declare class NonEmptyString extends NonEmptyString_base {
|
|
|
2563
2586
|
* @since 3.10.0
|
|
2564
2587
|
*/
|
|
2565
2588
|
export declare const UUIDSchemaId: unique symbol;
|
|
2566
|
-
declare const UUID_base: filter<
|
|
2589
|
+
declare const UUID_base: filter<typeof String$>;
|
|
2567
2590
|
/**
|
|
2568
2591
|
* Represents a Universally Unique Identifier (UUID).
|
|
2569
2592
|
*
|
|
@@ -2579,7 +2602,7 @@ export declare class UUID extends UUID_base {
|
|
|
2579
2602
|
* @since 3.10.0
|
|
2580
2603
|
*/
|
|
2581
2604
|
export declare const ULIDSchemaId: unique symbol;
|
|
2582
|
-
declare const ULID_base: filter<
|
|
2605
|
+
declare const ULID_base: filter<typeof String$>;
|
|
2583
2606
|
/**
|
|
2584
2607
|
* Represents a Universally Unique Lexicographically Sortable Identifier (ULID).
|
|
2585
2608
|
*
|
|
@@ -2629,7 +2652,7 @@ export type FiniteSchemaId = typeof FiniteSchemaId;
|
|
|
2629
2652
|
* @category number filters
|
|
2630
2653
|
* @since 3.10.0
|
|
2631
2654
|
*/
|
|
2632
|
-
export declare const finite: <
|
|
2655
|
+
export declare const finite: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2633
2656
|
/**
|
|
2634
2657
|
* @category schema id
|
|
2635
2658
|
* @since 3.10.0
|
|
@@ -2646,7 +2669,7 @@ export type GreaterThanSchemaId = typeof GreaterThanSchemaId;
|
|
|
2646
2669
|
* @category number filters
|
|
2647
2670
|
* @since 3.10.0
|
|
2648
2671
|
*/
|
|
2649
|
-
export declare const greaterThan: <
|
|
2672
|
+
export declare const greaterThan: <S extends Schema.Any>(exclusiveMinimum: number, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2650
2673
|
/**
|
|
2651
2674
|
* @category schema id
|
|
2652
2675
|
* @since 3.10.0
|
|
@@ -2663,7 +2686,7 @@ export type GreaterThanOrEqualToSchemaId = typeof GreaterThanOrEqualToSchemaId;
|
|
|
2663
2686
|
* @category number filters
|
|
2664
2687
|
* @since 3.10.0
|
|
2665
2688
|
*/
|
|
2666
|
-
export declare const greaterThanOrEqualTo: <
|
|
2689
|
+
export declare const greaterThanOrEqualTo: <S extends Schema.Any>(minimum: number, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2667
2690
|
/**
|
|
2668
2691
|
* @category schema id
|
|
2669
2692
|
* @since 3.10.0
|
|
@@ -2673,7 +2696,7 @@ export declare const MultipleOfSchemaId: unique symbol;
|
|
|
2673
2696
|
* @category number filters
|
|
2674
2697
|
* @since 3.10.0
|
|
2675
2698
|
*/
|
|
2676
|
-
export declare const multipleOf: <
|
|
2699
|
+
export declare const multipleOf: <S extends Schema.Any>(divisor: number, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2677
2700
|
/**
|
|
2678
2701
|
* @category schema id
|
|
2679
2702
|
* @since 3.10.0
|
|
@@ -2690,7 +2713,7 @@ export type IntSchemaId = typeof IntSchemaId;
|
|
|
2690
2713
|
* @category number filters
|
|
2691
2714
|
* @since 3.10.0
|
|
2692
2715
|
*/
|
|
2693
|
-
export declare const int: <
|
|
2716
|
+
export declare const int: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2694
2717
|
/**
|
|
2695
2718
|
* @category schema id
|
|
2696
2719
|
* @since 3.10.0
|
|
@@ -2707,7 +2730,7 @@ export type LessThanSchemaId = typeof LessThanSchemaId;
|
|
|
2707
2730
|
* @category number filters
|
|
2708
2731
|
* @since 3.10.0
|
|
2709
2732
|
*/
|
|
2710
|
-
export declare const lessThan: <
|
|
2733
|
+
export declare const lessThan: <S extends Schema.Any>(exclusiveMaximum: number, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2711
2734
|
/**
|
|
2712
2735
|
* @category schema id
|
|
2713
2736
|
* @since 3.10.0
|
|
@@ -2724,7 +2747,7 @@ export type LessThanOrEqualToSchemaId = typeof LessThanOrEqualToSchemaId;
|
|
|
2724
2747
|
* @category number filters
|
|
2725
2748
|
* @since 3.10.0
|
|
2726
2749
|
*/
|
|
2727
|
-
export declare const lessThanOrEqualTo: <
|
|
2750
|
+
export declare const lessThanOrEqualTo: <S extends Schema.Any>(maximum: number, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2728
2751
|
/**
|
|
2729
2752
|
* @category schema id
|
|
2730
2753
|
* @since 3.10.0
|
|
@@ -2741,7 +2764,7 @@ export type BetweenSchemaId = typeof BetweenSchemaId;
|
|
|
2741
2764
|
* @category number filters
|
|
2742
2765
|
* @since 3.10.0
|
|
2743
2766
|
*/
|
|
2744
|
-
export declare const between: <
|
|
2767
|
+
export declare const between: <S extends Schema.Any>(minimum: number, maximum: number, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2745
2768
|
/**
|
|
2746
2769
|
* @category schema id
|
|
2747
2770
|
* @since 3.10.0
|
|
@@ -2756,46 +2779,49 @@ export type NonNaNSchemaId = typeof NonNaNSchemaId;
|
|
|
2756
2779
|
* @category number filters
|
|
2757
2780
|
* @since 3.10.0
|
|
2758
2781
|
*/
|
|
2759
|
-
export declare const nonNaN: <
|
|
2782
|
+
export declare const nonNaN: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2760
2783
|
/**
|
|
2761
2784
|
* @category number filters
|
|
2762
2785
|
* @since 3.10.0
|
|
2763
2786
|
*/
|
|
2764
|
-
export declare const positive: <
|
|
2787
|
+
export declare const positive: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2765
2788
|
/**
|
|
2766
2789
|
* @category number filters
|
|
2767
2790
|
* @since 3.10.0
|
|
2768
2791
|
*/
|
|
2769
|
-
export declare const negative: <
|
|
2792
|
+
export declare const negative: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2770
2793
|
/**
|
|
2771
2794
|
* @category number filters
|
|
2772
2795
|
* @since 3.10.0
|
|
2773
2796
|
*/
|
|
2774
|
-
export declare const nonPositive: <
|
|
2797
|
+
export declare const nonPositive: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2775
2798
|
/**
|
|
2776
2799
|
* @category number filters
|
|
2777
2800
|
* @since 3.10.0
|
|
2778
2801
|
*/
|
|
2779
|
-
export declare const nonNegative: <
|
|
2802
|
+
export declare const nonNegative: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2780
2803
|
/**
|
|
2781
2804
|
* Clamps a number between a minimum and a maximum value.
|
|
2782
2805
|
*
|
|
2783
2806
|
* @category number transformations
|
|
2784
2807
|
* @since 3.10.0
|
|
2785
2808
|
*/
|
|
2786
|
-
export declare const clamp: (minimum: number, maximum: number) => <
|
|
2809
|
+
export declare const clamp: (minimum: number, maximum: number) => <S extends Schema.Any, A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => transform<S, filter<SchemaClass<A>>>;
|
|
2787
2810
|
/**
|
|
2788
|
-
* Transforms a `string` into a `number` by parsing the string using the `parse`
|
|
2811
|
+
* Transforms a `string` into a `number` by parsing the string using the `parse`
|
|
2812
|
+
* function of the `effect/Number` module.
|
|
2789
2813
|
*
|
|
2790
|
-
* It returns an error if the value can't be converted (for example when
|
|
2814
|
+
* It returns an error if the value can't be converted (for example when
|
|
2815
|
+
* non-numeric characters are provided).
|
|
2791
2816
|
*
|
|
2792
|
-
* The following special string values are supported: "NaN", "Infinity",
|
|
2817
|
+
* The following special string values are supported: "NaN", "Infinity",
|
|
2818
|
+
* "-Infinity".
|
|
2793
2819
|
*
|
|
2794
2820
|
* @category number transformations
|
|
2795
2821
|
* @since 3.10.0
|
|
2796
2822
|
*/
|
|
2797
|
-
export declare
|
|
2798
|
-
declare const NumberFromString_base: transformOrFail<
|
|
2823
|
+
export declare function parseNumber<S extends Schema.Any, A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>): transformOrFail<S, typeof Number$>;
|
|
2824
|
+
declare const NumberFromString_base: transformOrFail<SchemaClass<string, string, never>, typeof Number$, never>;
|
|
2799
2825
|
/**
|
|
2800
2826
|
* This schema transforms a `string` into a `number` by parsing the string using the `parse` function of the `effect/Number` module.
|
|
2801
2827
|
*
|
|
@@ -2808,49 +2834,49 @@ declare const NumberFromString_base: transformOrFail<Schema<string, string, neve
|
|
|
2808
2834
|
*/
|
|
2809
2835
|
export declare class NumberFromString extends NumberFromString_base {
|
|
2810
2836
|
}
|
|
2811
|
-
declare const Finite_base: filter<
|
|
2837
|
+
declare const Finite_base: filter<typeof Number$>;
|
|
2812
2838
|
/**
|
|
2813
2839
|
* @category number constructors
|
|
2814
2840
|
* @since 3.10.0
|
|
2815
2841
|
*/
|
|
2816
2842
|
export declare class Finite extends Finite_base {
|
|
2817
2843
|
}
|
|
2818
|
-
declare const Int_base: filter<
|
|
2844
|
+
declare const Int_base: filter<typeof Number$>;
|
|
2819
2845
|
/**
|
|
2820
2846
|
* @category number constructors
|
|
2821
2847
|
* @since 3.10.0
|
|
2822
2848
|
*/
|
|
2823
2849
|
export declare class Int extends Int_base {
|
|
2824
2850
|
}
|
|
2825
|
-
declare const NonNaN_base: filter<
|
|
2851
|
+
declare const NonNaN_base: filter<typeof Number$>;
|
|
2826
2852
|
/**
|
|
2827
2853
|
* @category number constructors
|
|
2828
2854
|
* @since 3.10.0
|
|
2829
2855
|
*/
|
|
2830
2856
|
export declare class NonNaN extends NonNaN_base {
|
|
2831
2857
|
}
|
|
2832
|
-
declare const Positive_base: filter<
|
|
2858
|
+
declare const Positive_base: filter<typeof Number$>;
|
|
2833
2859
|
/**
|
|
2834
2860
|
* @category number constructors
|
|
2835
2861
|
* @since 3.10.0
|
|
2836
2862
|
*/
|
|
2837
2863
|
export declare class Positive extends Positive_base {
|
|
2838
2864
|
}
|
|
2839
|
-
declare const Negative_base: filter<
|
|
2865
|
+
declare const Negative_base: filter<typeof Number$>;
|
|
2840
2866
|
/**
|
|
2841
2867
|
* @category number constructors
|
|
2842
2868
|
* @since 3.10.0
|
|
2843
2869
|
*/
|
|
2844
2870
|
export declare class Negative extends Negative_base {
|
|
2845
2871
|
}
|
|
2846
|
-
declare const NonPositive_base: filter<
|
|
2872
|
+
declare const NonPositive_base: filter<typeof Number$>;
|
|
2847
2873
|
/**
|
|
2848
2874
|
* @category number constructors
|
|
2849
2875
|
* @since 3.10.0
|
|
2850
2876
|
*/
|
|
2851
2877
|
export declare class NonPositive extends NonPositive_base {
|
|
2852
2878
|
}
|
|
2853
|
-
declare const NonNegative_base: filter<
|
|
2879
|
+
declare const NonNegative_base: filter<typeof Number$>;
|
|
2854
2880
|
/**
|
|
2855
2881
|
* @category number constructors
|
|
2856
2882
|
* @since 3.10.0
|
|
@@ -2867,7 +2893,7 @@ export declare const JsonNumberSchemaId: unique symbol;
|
|
|
2867
2893
|
* @since 3.10.0
|
|
2868
2894
|
*/
|
|
2869
2895
|
export type JsonNumberSchemaId = typeof JsonNumberSchemaId;
|
|
2870
|
-
declare const JsonNumber_base: filter<
|
|
2896
|
+
declare const JsonNumber_base: filter<typeof Number$>;
|
|
2871
2897
|
/**
|
|
2872
2898
|
* The `JsonNumber` is a schema for representing JSON numbers. It ensures that the provided value is a valid
|
|
2873
2899
|
* number by filtering out `NaN` and `(+/-) Infinity`. This is useful when you want to validate and represent numbers in JSON
|
|
@@ -2923,7 +2949,7 @@ export type GreaterThanBigIntSchemaId = typeof GreaterThanBigIntSchemaId;
|
|
|
2923
2949
|
* @category bigint filters
|
|
2924
2950
|
* @since 3.10.0
|
|
2925
2951
|
*/
|
|
2926
|
-
export declare const greaterThanBigInt: <
|
|
2952
|
+
export declare const greaterThanBigInt: <S extends Schema.Any>(min: bigint, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigint>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2927
2953
|
/**
|
|
2928
2954
|
* @category schema id
|
|
2929
2955
|
* @since 3.10.0
|
|
@@ -2938,7 +2964,7 @@ export type GreaterThanOrEqualToBigIntSchemaId = typeof GreaterThanOrEqualToBigI
|
|
|
2938
2964
|
* @category bigint filters
|
|
2939
2965
|
* @since 3.10.0
|
|
2940
2966
|
*/
|
|
2941
|
-
export declare const greaterThanOrEqualToBigInt: <
|
|
2967
|
+
export declare const greaterThanOrEqualToBigInt: <S extends Schema.Any>(min: bigint, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigint>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2942
2968
|
/**
|
|
2943
2969
|
* @category schema id
|
|
2944
2970
|
* @since 3.10.0
|
|
@@ -2953,7 +2979,7 @@ export type LessThanBigIntSchemaId = typeof LessThanBigIntSchemaId;
|
|
|
2953
2979
|
* @category bigint filters
|
|
2954
2980
|
* @since 3.10.0
|
|
2955
2981
|
*/
|
|
2956
|
-
export declare const lessThanBigInt: <
|
|
2982
|
+
export declare const lessThanBigInt: <S extends Schema.Any>(max: bigint, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigint>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2957
2983
|
/**
|
|
2958
2984
|
* @category schema id
|
|
2959
2985
|
* @since 3.10.0
|
|
@@ -2968,7 +2994,7 @@ export type LessThanOrEqualToBigIntSchemaId = typeof LessThanOrEqualToBigIntSche
|
|
|
2968
2994
|
* @category bigint filters
|
|
2969
2995
|
* @since 3.10.0
|
|
2970
2996
|
*/
|
|
2971
|
-
export declare const lessThanOrEqualToBigInt: <
|
|
2997
|
+
export declare const lessThanOrEqualToBigInt: <S extends Schema.Any>(max: bigint, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigint>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2972
2998
|
/**
|
|
2973
2999
|
* @category schema id
|
|
2974
3000
|
* @since 3.10.0
|
|
@@ -2983,34 +3009,34 @@ export type BetweenBigIntSchemaId = typeof BetweenBigIntSchemaId;
|
|
|
2983
3009
|
* @category bigint filters
|
|
2984
3010
|
* @since 3.10.0
|
|
2985
3011
|
*/
|
|
2986
|
-
export declare const betweenBigInt: <
|
|
3012
|
+
export declare const betweenBigInt: <S extends Schema.Any>(min: bigint, max: bigint, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigint>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2987
3013
|
/**
|
|
2988
3014
|
* @category bigint filters
|
|
2989
3015
|
* @since 3.10.0
|
|
2990
3016
|
*/
|
|
2991
|
-
export declare const positiveBigInt: <
|
|
3017
|
+
export declare const positiveBigInt: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigint>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2992
3018
|
/**
|
|
2993
3019
|
* @category bigint filters
|
|
2994
3020
|
* @since 3.10.0
|
|
2995
3021
|
*/
|
|
2996
|
-
export declare const negativeBigInt: <
|
|
3022
|
+
export declare const negativeBigInt: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigint>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
2997
3023
|
/**
|
|
2998
3024
|
* @category bigint filters
|
|
2999
3025
|
* @since 3.10.0
|
|
3000
3026
|
*/
|
|
3001
|
-
export declare const nonNegativeBigInt: <
|
|
3027
|
+
export declare const nonNegativeBigInt: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigint>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3002
3028
|
/**
|
|
3003
3029
|
* @category bigint filters
|
|
3004
3030
|
* @since 3.10.0
|
|
3005
3031
|
*/
|
|
3006
|
-
export declare const nonPositiveBigInt: <
|
|
3032
|
+
export declare const nonPositiveBigInt: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigint>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3007
3033
|
/**
|
|
3008
3034
|
* Clamps a bigint between a minimum and a maximum value.
|
|
3009
3035
|
*
|
|
3010
3036
|
* @category bigint transformations
|
|
3011
3037
|
* @since 3.10.0
|
|
3012
3038
|
*/
|
|
3013
|
-
export declare const clampBigInt: (minimum: bigint, maximum: bigint) => <
|
|
3039
|
+
export declare const clampBigInt: (minimum: bigint, maximum: bigint) => <S extends Schema.Any, A extends bigint>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => transform<S, filter<SchemaClass<A>>>;
|
|
3014
3040
|
declare const BigInt$_base: transformOrFail<SchemaClass<string, string, never>, typeof BigIntFromSelf, never>;
|
|
3015
3041
|
/** @ignore */
|
|
3016
3042
|
declare class BigInt$ extends BigInt$_base {
|
|
@@ -3065,7 +3091,7 @@ export declare const NonNegativeBigIntFromSelf: filter<Schema<bigint>>;
|
|
|
3065
3091
|
* @since 3.10.0
|
|
3066
3092
|
*/
|
|
3067
3093
|
export declare const NonNegativeBigInt: filter<Schema<bigint, string>>;
|
|
3068
|
-
declare const BigIntFromNumber_base: transformOrFail<SchemaClass<number, number, never>, filter<
|
|
3094
|
+
declare const BigIntFromNumber_base: transformOrFail<SchemaClass<number, number, never>, filter<typeof BigIntFromSelf>, never>;
|
|
3069
3095
|
/**
|
|
3070
3096
|
* This schema transforms a `number` into a `bigint` by parsing the number using the `BigInt` function.
|
|
3071
3097
|
*
|
|
@@ -3080,7 +3106,9 @@ export declare class BigIntFromNumber extends BigIntFromNumber_base {
|
|
|
3080
3106
|
* @category api interface
|
|
3081
3107
|
* @since 3.10.0
|
|
3082
3108
|
*/
|
|
3083
|
-
export interface RedactedFromSelf<Value extends Schema.Any> extends
|
|
3109
|
+
export interface RedactedFromSelf<Value extends Schema.Any> extends AnnotableDeclare<RedactedFromSelf<Value>, redacted_.Redacted<Schema.Type<Value>>, redacted_.Redacted<Schema.Encoded<Value>>, [
|
|
3110
|
+
Value
|
|
3111
|
+
]> {
|
|
3084
3112
|
}
|
|
3085
3113
|
/**
|
|
3086
3114
|
* @category Redacted constructors
|
|
@@ -3091,16 +3119,17 @@ export declare const RedactedFromSelf: <Value extends Schema.Any>(value: Value)
|
|
|
3091
3119
|
* @category api interface
|
|
3092
3120
|
* @since 3.10.0
|
|
3093
3121
|
*/
|
|
3094
|
-
export interface Redacted<Value extends Schema.Any> extends
|
|
3122
|
+
export interface Redacted<Value extends Schema.Any> extends transform<Value, RedactedFromSelf<SchemaClass<Schema.Type<Value>>>> {
|
|
3095
3123
|
}
|
|
3096
3124
|
/**
|
|
3097
|
-
* A
|
|
3125
|
+
* A transformation that transform a `Schema<A, I, R>` into a
|
|
3126
|
+
* `RedactedFromSelf<A>`.
|
|
3098
3127
|
*
|
|
3099
3128
|
* @category Redacted transformations
|
|
3100
3129
|
* @since 3.10.0
|
|
3101
3130
|
*/
|
|
3102
|
-
export declare
|
|
3103
|
-
declare const DurationFromSelf_base:
|
|
3131
|
+
export declare function Redacted<Value extends Schema.Any>(value: Value): Redacted<Value>;
|
|
3132
|
+
declare const DurationFromSelf_base: declare<duration_.Duration, duration_.Duration, readonly [], never>;
|
|
3104
3133
|
/**
|
|
3105
3134
|
* @category Duration constructors
|
|
3106
3135
|
* @since 3.10.0
|
|
@@ -3123,8 +3152,8 @@ export declare class DurationFromNanos extends DurationFromNanos_base {
|
|
|
3123
3152
|
* @category number constructors
|
|
3124
3153
|
* @since 3.11.10
|
|
3125
3154
|
*/
|
|
3126
|
-
export declare const NonNegativeInt: refine<number,
|
|
3127
|
-
declare const DurationFromMillis_base: transform<refine<number,
|
|
3155
|
+
export declare const NonNegativeInt: refine<number, typeof NonNegative>;
|
|
3156
|
+
declare const DurationFromMillis_base: transform<refine<number, typeof Number$>, typeof DurationFromSelf>;
|
|
3128
3157
|
/**
|
|
3129
3158
|
* A schema that transforms a (possibly Infinite) non negative number into a
|
|
3130
3159
|
* `Duration`. Treats the value as the number of milliseconds.
|
|
@@ -3162,7 +3191,7 @@ export declare class Duration extends Duration_base {
|
|
|
3162
3191
|
* @category Duration transformations
|
|
3163
3192
|
* @since 3.10.0
|
|
3164
3193
|
*/
|
|
3165
|
-
export declare const clampDuration: (minimum: duration_.DurationInput, maximum: duration_.DurationInput) => <A extends duration_.Duration
|
|
3194
|
+
export declare const clampDuration: (minimum: duration_.DurationInput, maximum: duration_.DurationInput) => <S extends Schema.Any, A extends duration_.Duration>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => transform<S, filter<SchemaClass<A>>>;
|
|
3166
3195
|
/**
|
|
3167
3196
|
* @category schema id
|
|
3168
3197
|
* @since 3.10.0
|
|
@@ -3172,7 +3201,7 @@ export declare const LessThanDurationSchemaId: unique symbol;
|
|
|
3172
3201
|
* @category Duration filters
|
|
3173
3202
|
* @since 3.10.0
|
|
3174
3203
|
*/
|
|
3175
|
-
export declare const lessThanDuration: <
|
|
3204
|
+
export declare const lessThanDuration: <S extends Schema.Any>(max: duration_.DurationInput, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends duration_.Duration>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3176
3205
|
/**
|
|
3177
3206
|
* @category schema id
|
|
3178
3207
|
* @since 3.10.0
|
|
@@ -3182,7 +3211,7 @@ export declare const LessThanOrEqualToDurationSchemaId: unique symbol;
|
|
|
3182
3211
|
* @category Duration filters
|
|
3183
3212
|
* @since 3.10.0
|
|
3184
3213
|
*/
|
|
3185
|
-
export declare const lessThanOrEqualToDuration: <
|
|
3214
|
+
export declare const lessThanOrEqualToDuration: <S extends Schema.Any>(max: duration_.DurationInput, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends duration_.Duration>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3186
3215
|
/**
|
|
3187
3216
|
* @category schema id
|
|
3188
3217
|
* @since 3.10.0
|
|
@@ -3192,7 +3221,7 @@ export declare const GreaterThanDurationSchemaId: unique symbol;
|
|
|
3192
3221
|
* @category Duration filters
|
|
3193
3222
|
* @since 3.10.0
|
|
3194
3223
|
*/
|
|
3195
|
-
export declare const greaterThanDuration: <
|
|
3224
|
+
export declare const greaterThanDuration: <S extends Schema.Any>(min: duration_.DurationInput, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends duration_.Duration>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3196
3225
|
/**
|
|
3197
3226
|
* @category schema id
|
|
3198
3227
|
* @since 3.10.0
|
|
@@ -3202,7 +3231,7 @@ export declare const GreaterThanOrEqualToDurationSchemaId: unique symbol;
|
|
|
3202
3231
|
* @category Duration filters
|
|
3203
3232
|
* @since 3.10.0
|
|
3204
3233
|
*/
|
|
3205
|
-
export declare const greaterThanOrEqualToDuration: <
|
|
3234
|
+
export declare const greaterThanOrEqualToDuration: <S extends Schema.Any>(min: duration_.DurationInput, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends duration_.Duration>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3206
3235
|
/**
|
|
3207
3236
|
* @category schema id
|
|
3208
3237
|
* @since 3.10.0
|
|
@@ -3212,18 +3241,25 @@ export declare const BetweenDurationSchemaId: unique symbol;
|
|
|
3212
3241
|
* @category Duration filters
|
|
3213
3242
|
* @since 3.10.0
|
|
3214
3243
|
*/
|
|
3215
|
-
export declare const betweenDuration: <
|
|
3244
|
+
export declare const betweenDuration: <S extends Schema.Any>(minimum: duration_.DurationInput, maximum: duration_.DurationInput, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends duration_.Duration>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3245
|
+
declare const Uint8ArrayFromSelf_base: declare<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, readonly [], never>;
|
|
3216
3246
|
/**
|
|
3217
3247
|
* @category Uint8Array constructors
|
|
3218
3248
|
* @since 3.10.0
|
|
3219
3249
|
*/
|
|
3220
|
-
export declare
|
|
3250
|
+
export declare class Uint8ArrayFromSelf extends Uint8ArrayFromSelf_base {
|
|
3251
|
+
}
|
|
3252
|
+
declare const Uint8_base: filter<typeof Number$>;
|
|
3221
3253
|
/**
|
|
3222
3254
|
* @category number constructors
|
|
3223
3255
|
* @since 3.11.10
|
|
3224
3256
|
*/
|
|
3225
|
-
export declare
|
|
3226
|
-
|
|
3257
|
+
export declare class Uint8 extends Uint8_base {
|
|
3258
|
+
}
|
|
3259
|
+
declare const Uint8Array$_base: transform<Array$<typeof Uint8>, typeof Uint8ArrayFromSelf>;
|
|
3260
|
+
/** @ignore */
|
|
3261
|
+
declare class Uint8Array$ extends Uint8Array$_base {
|
|
3262
|
+
}
|
|
3227
3263
|
export {
|
|
3228
3264
|
/**
|
|
3229
3265
|
* A schema that transforms an array of numbers into a `Uint8Array`.
|
|
@@ -3311,7 +3347,7 @@ export type MinItemsSchemaId = typeof MinItemsSchemaId;
|
|
|
3311
3347
|
* @category ReadonlyArray filters
|
|
3312
3348
|
* @since 3.10.0
|
|
3313
3349
|
*/
|
|
3314
|
-
export declare const minItems: <
|
|
3350
|
+
export declare const minItems: <S extends Schema.Any>(n: number, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends ReadonlyArray<any>>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3315
3351
|
/**
|
|
3316
3352
|
* @category schema id
|
|
3317
3353
|
* @since 3.10.0
|
|
@@ -3326,7 +3362,7 @@ export type MaxItemsSchemaId = typeof MaxItemsSchemaId;
|
|
|
3326
3362
|
* @category ReadonlyArray filters
|
|
3327
3363
|
* @since 3.10.0
|
|
3328
3364
|
*/
|
|
3329
|
-
export declare const maxItems: <
|
|
3365
|
+
export declare const maxItems: <S extends Schema.Any>(n: number, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends ReadonlyArray<any>>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3330
3366
|
/**
|
|
3331
3367
|
* @category schema id
|
|
3332
3368
|
* @since 3.10.0
|
|
@@ -3341,7 +3377,7 @@ export type ItemsCountSchemaId = typeof ItemsCountSchemaId;
|
|
|
3341
3377
|
* @category ReadonlyArray filters
|
|
3342
3378
|
* @since 3.10.0
|
|
3343
3379
|
*/
|
|
3344
|
-
export declare const itemsCount: <
|
|
3380
|
+
export declare const itemsCount: <S extends Schema.Any>(n: number, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends ReadonlyArray<any>>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3345
3381
|
/**
|
|
3346
3382
|
* @category ReadonlyArray transformations
|
|
3347
3383
|
* @since 3.10.0
|
|
@@ -3353,14 +3389,14 @@ export declare const getNumberIndexedAccess: <A extends ReadonlyArray<any>, I ex
|
|
|
3353
3389
|
* @category ReadonlyArray transformations
|
|
3354
3390
|
* @since 3.10.0
|
|
3355
3391
|
*/
|
|
3356
|
-
export declare
|
|
3392
|
+
export declare function head<S extends Schema.Any, A extends ReadonlyArray<unknown>>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>): transform<S, OptionFromSelf<SchemaClass<A[number]>>>;
|
|
3357
3393
|
/**
|
|
3358
3394
|
* Get the first element of a `NonEmptyReadonlyArray`.
|
|
3359
3395
|
*
|
|
3360
3396
|
* @category NonEmptyReadonlyArray transformations
|
|
3361
3397
|
* @since 3.12.0
|
|
3362
3398
|
*/
|
|
3363
|
-
export declare
|
|
3399
|
+
export declare function headNonEmpty<S extends Schema.Any, A extends array_.NonEmptyReadonlyArray<unknown>>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>): transform<S, SchemaClass<A[number]>>;
|
|
3364
3400
|
/**
|
|
3365
3401
|
* Retrieves the first element of a `ReadonlyArray`.
|
|
3366
3402
|
*
|
|
@@ -3378,7 +3414,7 @@ export declare const headOrElse: {
|
|
|
3378
3414
|
* @category ReadonlyArray transformations
|
|
3379
3415
|
* @since 3.10.0
|
|
3380
3416
|
*/
|
|
3381
|
-
<A
|
|
3417
|
+
<S extends Schema.Any, A extends ReadonlyArray<unknown>>(fallback?: LazyArg<A[number]>): (self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => transform<S, SchemaClass<A[number]>>;
|
|
3382
3418
|
/**
|
|
3383
3419
|
* Retrieves the first element of a `ReadonlyArray`.
|
|
3384
3420
|
*
|
|
@@ -3387,7 +3423,7 @@ export declare const headOrElse: {
|
|
|
3387
3423
|
* @category ReadonlyArray transformations
|
|
3388
3424
|
* @since 3.10.0
|
|
3389
3425
|
*/
|
|
3390
|
-
<
|
|
3426
|
+
<S extends Schema.Any, A extends ReadonlyArray<unknown>>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>, fallback?: LazyArg<A[number]>): transform<S, SchemaClass<A[number]>>;
|
|
3391
3427
|
};
|
|
3392
3428
|
/**
|
|
3393
3429
|
* @category schema id
|
|
@@ -3403,7 +3439,7 @@ export declare const ValidDateSchemaId: unique symbol;
|
|
|
3403
3439
|
* @category Date filters
|
|
3404
3440
|
* @since 3.10.0
|
|
3405
3441
|
*/
|
|
3406
|
-
export declare const validDate: (annotations?: Annotations.Filter<
|
|
3442
|
+
export declare const validDate: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends Date>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3407
3443
|
/**
|
|
3408
3444
|
* @category schema id
|
|
3409
3445
|
* @since 3.10.0
|
|
@@ -3413,7 +3449,7 @@ export declare const LessThanDateSchemaId: unique symbol;
|
|
|
3413
3449
|
* @category Date filters
|
|
3414
3450
|
* @since 3.10.0
|
|
3415
3451
|
*/
|
|
3416
|
-
export declare const lessThanDate: <
|
|
3452
|
+
export declare const lessThanDate: <S extends Schema.Any>(max: Date, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends Date>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3417
3453
|
/**
|
|
3418
3454
|
* @category schema id
|
|
3419
3455
|
* @since 3.10.0
|
|
@@ -3423,7 +3459,7 @@ export declare const LessThanOrEqualToDateSchemaId: unique symbol;
|
|
|
3423
3459
|
* @category Date filters
|
|
3424
3460
|
* @since 3.10.0
|
|
3425
3461
|
*/
|
|
3426
|
-
export declare const lessThanOrEqualToDate: <
|
|
3462
|
+
export declare const lessThanOrEqualToDate: <S extends Schema.Any>(max: Date, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends Date>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3427
3463
|
/**
|
|
3428
3464
|
* @category schema id
|
|
3429
3465
|
* @since 3.10.0
|
|
@@ -3433,7 +3469,7 @@ export declare const GreaterThanDateSchemaId: unique symbol;
|
|
|
3433
3469
|
* @category Date filters
|
|
3434
3470
|
* @since 3.10.0
|
|
3435
3471
|
*/
|
|
3436
|
-
export declare const greaterThanDate: <
|
|
3472
|
+
export declare const greaterThanDate: <S extends Schema.Any>(min: Date, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends Date>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3437
3473
|
/**
|
|
3438
3474
|
* @category schema id
|
|
3439
3475
|
* @since 3.10.0
|
|
@@ -3443,7 +3479,7 @@ export declare const GreaterThanOrEqualToDateSchemaId: unique symbol;
|
|
|
3443
3479
|
* @category Date filters
|
|
3444
3480
|
* @since 3.10.0
|
|
3445
3481
|
*/
|
|
3446
|
-
export declare const greaterThanOrEqualToDate: <
|
|
3482
|
+
export declare const greaterThanOrEqualToDate: <S extends Schema.Any>(min: Date, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends Date>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3447
3483
|
/**
|
|
3448
3484
|
* @category schema id
|
|
3449
3485
|
* @since 3.10.0
|
|
@@ -3453,7 +3489,7 @@ export declare const BetweenDateSchemaId: unique symbol;
|
|
|
3453
3489
|
* @category Date filters
|
|
3454
3490
|
* @since 3.10.0
|
|
3455
3491
|
*/
|
|
3456
|
-
export declare const betweenDate: <
|
|
3492
|
+
export declare const betweenDate: <S extends Schema.Any>(min: Date, max: Date, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends Date>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3457
3493
|
/**
|
|
3458
3494
|
* @category schema id
|
|
3459
3495
|
* @since 3.11.8
|
|
@@ -3464,7 +3500,7 @@ export declare const DateFromSelfSchemaId: unique symbol;
|
|
|
3464
3500
|
* @since 3.11.8
|
|
3465
3501
|
*/
|
|
3466
3502
|
export type DateFromSelfSchemaId = typeof DateFromSelfSchemaId;
|
|
3467
|
-
declare const DateFromSelf_base:
|
|
3503
|
+
declare const DateFromSelf_base: declare<Date, Date, readonly [], never>;
|
|
3468
3504
|
/**
|
|
3469
3505
|
* Describes a schema that accommodates potentially invalid `Date` instances,
|
|
3470
3506
|
* such as `new Date("Invalid Date")`, without rejection.
|
|
@@ -3474,7 +3510,7 @@ declare const DateFromSelf_base: SchemaClass<Date, Date, never>;
|
|
|
3474
3510
|
*/
|
|
3475
3511
|
export declare class DateFromSelf extends DateFromSelf_base {
|
|
3476
3512
|
}
|
|
3477
|
-
declare const ValidDateFromSelf_base: filter<
|
|
3513
|
+
declare const ValidDateFromSelf_base: filter<typeof DateFromSelf>;
|
|
3478
3514
|
/**
|
|
3479
3515
|
* Defines a schema that ensures only valid dates are accepted. This schema
|
|
3480
3516
|
* rejects values like `new Date("Invalid Date")`, which, despite being a `Date`
|
|
@@ -3499,7 +3535,7 @@ declare const DateFromString_base: transform<SchemaClass<string, string, never>,
|
|
|
3499
3535
|
*/
|
|
3500
3536
|
export declare class DateFromString extends DateFromString_base {
|
|
3501
3537
|
}
|
|
3502
|
-
declare const Date$_base: filter<
|
|
3538
|
+
declare const Date$_base: filter<typeof DateFromString>;
|
|
3503
3539
|
/** @ignore */
|
|
3504
3540
|
declare class Date$ extends Date$_base {
|
|
3505
3541
|
}
|
|
@@ -3527,7 +3563,7 @@ declare const DateFromNumber_base: transform<SchemaClass<number, number, never>,
|
|
|
3527
3563
|
*/
|
|
3528
3564
|
export declare class DateFromNumber extends DateFromNumber_base {
|
|
3529
3565
|
}
|
|
3530
|
-
declare const DateTimeUtcFromSelf_base:
|
|
3566
|
+
declare const DateTimeUtcFromSelf_base: declare<dateTime.Utc, dateTime.Utc, readonly [], never>;
|
|
3531
3567
|
/**
|
|
3532
3568
|
* Describes a schema that represents a `DateTime.Utc` instance.
|
|
3533
3569
|
*
|
|
@@ -3545,7 +3581,7 @@ declare const DateTimeUtcFromNumber_base: transformOrFail<SchemaClass<number, nu
|
|
|
3545
3581
|
*/
|
|
3546
3582
|
export declare class DateTimeUtcFromNumber extends DateTimeUtcFromNumber_base {
|
|
3547
3583
|
}
|
|
3548
|
-
declare const DateTimeUtcFromDate_base: transformOrFail<
|
|
3584
|
+
declare const DateTimeUtcFromDate_base: transformOrFail<declare<Date, Date, readonly [], never>, typeof DateTimeUtcFromSelf, never>;
|
|
3549
3585
|
/**
|
|
3550
3586
|
* Defines a schema that attempts to convert a `Date` to a `DateTime.Utc` instance using the `DateTime.unsafeMake` constructor.
|
|
3551
3587
|
*
|
|
@@ -3563,7 +3599,7 @@ declare const DateTimeUtc_base: transformOrFail<SchemaClass<string, string, neve
|
|
|
3563
3599
|
*/
|
|
3564
3600
|
export declare class DateTimeUtc extends DateTimeUtc_base {
|
|
3565
3601
|
}
|
|
3566
|
-
declare const TimeZoneOffsetFromSelf_base:
|
|
3602
|
+
declare const TimeZoneOffsetFromSelf_base: declare<dateTime.TimeZone.Offset, dateTime.TimeZone.Offset, readonly [], never>;
|
|
3567
3603
|
/**
|
|
3568
3604
|
* Describes a schema that represents a `TimeZone.Offset` instance.
|
|
3569
3605
|
*
|
|
@@ -3581,7 +3617,7 @@ declare const TimeZoneOffset_base: transform<SchemaClass<number, number, never>,
|
|
|
3581
3617
|
*/
|
|
3582
3618
|
export declare class TimeZoneOffset extends TimeZoneOffset_base {
|
|
3583
3619
|
}
|
|
3584
|
-
declare const TimeZoneNamedFromSelf_base:
|
|
3620
|
+
declare const TimeZoneNamedFromSelf_base: declare<dateTime.TimeZone.Named, dateTime.TimeZone.Named, readonly [], never>;
|
|
3585
3621
|
/**
|
|
3586
3622
|
* Describes a schema that represents a `TimeZone.Named` instance.
|
|
3587
3623
|
*
|
|
@@ -3615,7 +3651,7 @@ declare const TimeZone_base: transformOrFail<SchemaClass<string, string, never>,
|
|
|
3615
3651
|
*/
|
|
3616
3652
|
export declare class TimeZone extends TimeZone_base {
|
|
3617
3653
|
}
|
|
3618
|
-
declare const DateTimeZonedFromSelf_base:
|
|
3654
|
+
declare const DateTimeZonedFromSelf_base: declare<dateTime.Zoned, dateTime.Zoned, readonly [], never>;
|
|
3619
3655
|
/**
|
|
3620
3656
|
* Describes a schema that represents a `DateTime.Zoned` instance.
|
|
3621
3657
|
*
|
|
@@ -3647,7 +3683,9 @@ export type OptionEncoded<I> = {
|
|
|
3647
3683
|
* @category api interface
|
|
3648
3684
|
* @since 3.10.0
|
|
3649
3685
|
*/
|
|
3650
|
-
export interface OptionFromSelf<Value extends Schema.Any> extends
|
|
3686
|
+
export interface OptionFromSelf<Value extends Schema.Any> extends AnnotableDeclare<OptionFromSelf<Value>, option_.Option<Schema.Type<Value>>, option_.Option<Schema.Encoded<Value>>, [
|
|
3687
|
+
Value
|
|
3688
|
+
]> {
|
|
3651
3689
|
}
|
|
3652
3690
|
/**
|
|
3653
3691
|
* @category Option transformations
|
|
@@ -3658,46 +3696,55 @@ export declare const OptionFromSelf: <Value extends Schema.Any>(value: Value) =>
|
|
|
3658
3696
|
* @category api interface
|
|
3659
3697
|
* @since 3.10.0
|
|
3660
3698
|
*/
|
|
3661
|
-
export interface Option<Value extends Schema.Any> extends
|
|
3699
|
+
export interface Option<Value extends Schema.Any> extends transform<Union<[
|
|
3700
|
+
Struct<{
|
|
3701
|
+
_tag: Literal<["None"]>;
|
|
3702
|
+
}>,
|
|
3703
|
+
Struct<{
|
|
3704
|
+
_tag: Literal<["Some"]>;
|
|
3705
|
+
value: Value;
|
|
3706
|
+
}>
|
|
3707
|
+
]>, OptionFromSelf<SchemaClass<Schema.Type<Value>>>> {
|
|
3662
3708
|
}
|
|
3663
3709
|
/**
|
|
3664
3710
|
* @category Option transformations
|
|
3665
3711
|
* @since 3.10.0
|
|
3666
3712
|
*/
|
|
3667
|
-
export declare
|
|
3713
|
+
export declare function Option<Value extends Schema.Any>(value: Value): Option<Value>;
|
|
3668
3714
|
/**
|
|
3669
3715
|
* @category api interface
|
|
3670
3716
|
* @since 3.10.0
|
|
3671
3717
|
*/
|
|
3672
|
-
export interface OptionFromNullOr<Value extends Schema.Any> extends
|
|
3718
|
+
export interface OptionFromNullOr<Value extends Schema.Any> extends transform<NullOr<Value>, OptionFromSelf<SchemaClass<Schema.Type<Value>>>> {
|
|
3673
3719
|
}
|
|
3674
3720
|
/**
|
|
3675
3721
|
* @category Option transformations
|
|
3676
3722
|
* @since 3.10.0
|
|
3677
3723
|
*/
|
|
3678
|
-
export declare
|
|
3724
|
+
export declare function OptionFromNullOr<Value extends Schema.Any>(value: Value): OptionFromNullOr<Value>;
|
|
3679
3725
|
/**
|
|
3680
3726
|
* @category api interface
|
|
3681
3727
|
* @since 3.10.0
|
|
3682
3728
|
*/
|
|
3683
|
-
export interface OptionFromNullishOr<Value extends Schema.Any> extends
|
|
3729
|
+
export interface OptionFromNullishOr<Value extends Schema.Any> extends transform<NullishOr<Value>, OptionFromSelf<SchemaClass<Schema.Type<Value>>>> {
|
|
3684
3730
|
}
|
|
3685
3731
|
/**
|
|
3686
3732
|
* @category Option transformations
|
|
3687
3733
|
* @since 3.10.0
|
|
3688
3734
|
*/
|
|
3689
|
-
export declare
|
|
3735
|
+
export declare function OptionFromNullishOr<Value extends Schema.Any>(value: Value, onNoneEncoding: null | undefined): OptionFromNullishOr<Value>;
|
|
3690
3736
|
/**
|
|
3691
3737
|
* @category api interface
|
|
3692
3738
|
* @since 3.10.0
|
|
3693
3739
|
*/
|
|
3694
|
-
export interface OptionFromUndefinedOr<Value extends Schema.Any> extends
|
|
3740
|
+
export interface OptionFromUndefinedOr<Value extends Schema.Any> extends transform<UndefinedOr<Value>, OptionFromSelf<SchemaClass<Schema.Type<Value>>>> {
|
|
3695
3741
|
}
|
|
3696
3742
|
/**
|
|
3697
3743
|
* @category Option transformations
|
|
3698
3744
|
* @since 3.10.0
|
|
3699
3745
|
*/
|
|
3700
|
-
export declare
|
|
3746
|
+
export declare function OptionFromUndefinedOr<Value extends Schema.Any>(value: Value): OptionFromUndefinedOr<Value>;
|
|
3747
|
+
declare const OptionFromNonEmptyTrimmedString_base: transform<typeof String$, OptionFromSelf<typeof NonEmptyTrimmedString>>;
|
|
3701
3748
|
/**
|
|
3702
3749
|
* Transforms strings into an Option type, effectively filtering out empty or
|
|
3703
3750
|
* whitespace-only strings by trimming them and checking their length. Returns
|
|
@@ -3715,7 +3762,8 @@ export declare const OptionFromUndefinedOr: <Value extends Schema.Any>(value: Va
|
|
|
3715
3762
|
* @category Option transformations
|
|
3716
3763
|
* @since 3.10.0
|
|
3717
3764
|
*/
|
|
3718
|
-
export declare
|
|
3765
|
+
export declare class OptionFromNonEmptyTrimmedString extends OptionFromNonEmptyTrimmedString_base {
|
|
3766
|
+
}
|
|
3719
3767
|
/**
|
|
3720
3768
|
* @category Either utils
|
|
3721
3769
|
* @since 3.10.0
|
|
@@ -3741,7 +3789,10 @@ export type EitherEncoded<IR, IL> = RightEncoded<IR> | LeftEncoded<IL>;
|
|
|
3741
3789
|
* @category api interface
|
|
3742
3790
|
* @since 3.10.0
|
|
3743
3791
|
*/
|
|
3744
|
-
export interface EitherFromSelf<R extends Schema.All, L extends Schema.All> extends
|
|
3792
|
+
export interface EitherFromSelf<R extends Schema.All, L extends Schema.All> extends AnnotableDeclare<EitherFromSelf<R, L>, either_.Either<Schema.Type<R>, Schema.Type<L>>, either_.Either<Schema.Encoded<R>, Schema.Encoded<L>>, [
|
|
3793
|
+
R,
|
|
3794
|
+
L
|
|
3795
|
+
]> {
|
|
3745
3796
|
}
|
|
3746
3797
|
/**
|
|
3747
3798
|
* @category Either transformations
|
|
@@ -3755,7 +3806,16 @@ export declare const EitherFromSelf: <R extends Schema.All, L extends Schema.All
|
|
|
3755
3806
|
* @category api interface
|
|
3756
3807
|
* @since 3.10.0
|
|
3757
3808
|
*/
|
|
3758
|
-
export interface Either<
|
|
3809
|
+
export interface Either<Right extends Schema.All, Left extends Schema.All> extends transform<Union<[
|
|
3810
|
+
Struct<{
|
|
3811
|
+
_tag: Literal<["Right"]>;
|
|
3812
|
+
right: Right;
|
|
3813
|
+
}>,
|
|
3814
|
+
Struct<{
|
|
3815
|
+
_tag: Literal<["Left"]>;
|
|
3816
|
+
left: Left;
|
|
3817
|
+
}>
|
|
3818
|
+
]>, EitherFromSelf<SchemaClass<Schema.Type<Right>>, SchemaClass<Schema.Type<Left>>>> {
|
|
3759
3819
|
}
|
|
3760
3820
|
/**
|
|
3761
3821
|
* @category Either transformations
|
|
@@ -3769,7 +3829,16 @@ export declare const Either: <R extends Schema.All, L extends Schema.All>({ left
|
|
|
3769
3829
|
* @category api interface
|
|
3770
3830
|
* @since 3.10.0
|
|
3771
3831
|
*/
|
|
3772
|
-
export interface EitherFromUnion<
|
|
3832
|
+
export interface EitherFromUnion<Right extends Schema.All, Left extends Schema.All> extends transform<Union<[
|
|
3833
|
+
transform<Right, Struct<{
|
|
3834
|
+
_tag: Literal<["Right"]>;
|
|
3835
|
+
right: SchemaClass<Schema.Type<Right>>;
|
|
3836
|
+
}>>,
|
|
3837
|
+
transform<Left, Struct<{
|
|
3838
|
+
_tag: Literal<["Left"]>;
|
|
3839
|
+
right: SchemaClass<Schema.Type<Left>>;
|
|
3840
|
+
}>>
|
|
3841
|
+
]>, EitherFromSelf<SchemaClass<Schema.Type<Right>>, SchemaClass<Schema.Type<Left>>>> {
|
|
3773
3842
|
}
|
|
3774
3843
|
/**
|
|
3775
3844
|
* @example
|
|
@@ -3783,15 +3852,18 @@ export interface EitherFromUnion<R extends Schema.All, L extends Schema.All> ext
|
|
|
3783
3852
|
* @category Either transformations
|
|
3784
3853
|
* @since 3.10.0
|
|
3785
3854
|
*/
|
|
3786
|
-
export declare const EitherFromUnion: <
|
|
3787
|
-
readonly left:
|
|
3788
|
-
readonly right:
|
|
3789
|
-
}) => EitherFromUnion<
|
|
3855
|
+
export declare const EitherFromUnion: <Right extends Schema.All, Left extends Schema.All>({ left, right }: {
|
|
3856
|
+
readonly left: Left;
|
|
3857
|
+
readonly right: Right;
|
|
3858
|
+
}) => EitherFromUnion<Right, Left>;
|
|
3790
3859
|
/**
|
|
3791
3860
|
* @category api interface
|
|
3792
3861
|
* @since 3.10.0
|
|
3793
3862
|
*/
|
|
3794
|
-
export interface ReadonlyMapFromSelf<K extends Schema.Any, V extends Schema.Any> extends
|
|
3863
|
+
export interface ReadonlyMapFromSelf<K extends Schema.Any, V extends Schema.Any> extends AnnotableDeclare<ReadonlyMapFromSelf<K, V>, ReadonlyMap<Schema.Type<K>, Schema.Type<V>>, ReadonlyMap<Schema.Encoded<K>, Schema.Encoded<V>>, [
|
|
3864
|
+
K,
|
|
3865
|
+
V
|
|
3866
|
+
]> {
|
|
3795
3867
|
}
|
|
3796
3868
|
/**
|
|
3797
3869
|
* @category ReadonlyMap
|
|
@@ -3805,7 +3877,10 @@ export declare const ReadonlyMapFromSelf: <K extends Schema.Any, V extends Schem
|
|
|
3805
3877
|
* @category api interface
|
|
3806
3878
|
* @since 3.10.0
|
|
3807
3879
|
*/
|
|
3808
|
-
export interface MapFromSelf<K extends Schema.Any, V extends Schema.Any> extends
|
|
3880
|
+
export interface MapFromSelf<K extends Schema.Any, V extends Schema.Any> extends AnnotableDeclare<MapFromSelf<K, V>, Map<Schema.Type<K>, Schema.Type<V>>, ReadonlyMap<Schema.Encoded<K>, Schema.Encoded<V>>, [
|
|
3881
|
+
K,
|
|
3882
|
+
V
|
|
3883
|
+
]> {
|
|
3809
3884
|
}
|
|
3810
3885
|
/**
|
|
3811
3886
|
* @category Map
|
|
@@ -3819,26 +3894,27 @@ export declare const MapFromSelf: <K extends Schema.Any, V extends Schema.Any>({
|
|
|
3819
3894
|
* @category api interface
|
|
3820
3895
|
* @since 3.10.0
|
|
3821
3896
|
*/
|
|
3822
|
-
export interface ReadonlyMap$<K extends Schema.Any, V extends Schema.Any> extends
|
|
3897
|
+
export interface ReadonlyMap$<K extends Schema.Any, V extends Schema.Any> extends transform<Array$<Tuple2<K, V>>, ReadonlyMapFromSelf<SchemaClass<Schema.Type<K>>, SchemaClass<Schema.Type<V>>>> {
|
|
3823
3898
|
}
|
|
3824
3899
|
/**
|
|
3825
3900
|
* @category ReadonlyMap transformations
|
|
3826
3901
|
* @since 3.10.0
|
|
3827
3902
|
*/
|
|
3828
|
-
export declare
|
|
3903
|
+
export declare function ReadonlyMap<K extends Schema.Any, V extends Schema.Any>({ key, value }: {
|
|
3829
3904
|
readonly key: K;
|
|
3830
3905
|
readonly value: V;
|
|
3831
|
-
})
|
|
3906
|
+
}): ReadonlyMap$<K, V>;
|
|
3832
3907
|
/**
|
|
3833
3908
|
* @category api interface
|
|
3834
3909
|
* @since 3.10.0
|
|
3835
3910
|
*/
|
|
3836
|
-
export interface Map$<K extends Schema.Any, V extends Schema.Any> extends
|
|
3911
|
+
export interface Map$<K extends Schema.Any, V extends Schema.Any> extends transform<Array$<Tuple2<K, V>>, MapFromSelf<SchemaClass<Schema.Type<K>>, SchemaClass<Schema.Type<V>>>> {
|
|
3837
3912
|
}
|
|
3838
|
-
|
|
3913
|
+
/** @ignore */
|
|
3914
|
+
declare function map<K extends Schema.Any, V extends Schema.Any>({ key, value }: {
|
|
3839
3915
|
readonly key: K;
|
|
3840
3916
|
readonly value: V;
|
|
3841
|
-
})
|
|
3917
|
+
}): Map$<K, V>;
|
|
3842
3918
|
export {
|
|
3843
3919
|
/**
|
|
3844
3920
|
* @category Map transformations
|
|
@@ -3852,7 +3928,7 @@ map as Map };
|
|
|
3852
3928
|
export declare const ReadonlyMapFromRecord: <KA, KR, VA, VI, VR>({ key, value }: {
|
|
3853
3929
|
key: Schema<KA, string, KR>;
|
|
3854
3930
|
value: Schema<VA, VI, VR>;
|
|
3855
|
-
}) =>
|
|
3931
|
+
}) => SchemaClass<ReadonlyMap<KA, VA>, {
|
|
3856
3932
|
readonly [x: string]: VI;
|
|
3857
3933
|
}, KR | VR>;
|
|
3858
3934
|
/**
|
|
@@ -3862,14 +3938,16 @@ export declare const ReadonlyMapFromRecord: <KA, KR, VA, VI, VR>({ key, value }:
|
|
|
3862
3938
|
export declare const MapFromRecord: <KA, KR, VA, VI, VR>({ key, value }: {
|
|
3863
3939
|
key: Schema<KA, string, KR>;
|
|
3864
3940
|
value: Schema<VA, VI, VR>;
|
|
3865
|
-
}) =>
|
|
3941
|
+
}) => SchemaClass<Map<KA, VA>, {
|
|
3866
3942
|
readonly [x: string]: VI;
|
|
3867
3943
|
}, KR | VR>;
|
|
3868
3944
|
/**
|
|
3869
3945
|
* @category api interface
|
|
3870
3946
|
* @since 3.10.0
|
|
3871
3947
|
*/
|
|
3872
|
-
export interface ReadonlySetFromSelf<Value extends Schema.Any> extends
|
|
3948
|
+
export interface ReadonlySetFromSelf<Value extends Schema.Any> extends AnnotableDeclare<ReadonlySetFromSelf<Value>, ReadonlySet<Schema.Type<Value>>, ReadonlySet<Schema.Encoded<Value>>, [
|
|
3949
|
+
Value
|
|
3950
|
+
]> {
|
|
3873
3951
|
}
|
|
3874
3952
|
/**
|
|
3875
3953
|
* @category ReadonlySet
|
|
@@ -3880,7 +3958,9 @@ export declare const ReadonlySetFromSelf: <Value extends Schema.Any>(value: Valu
|
|
|
3880
3958
|
* @category api interface
|
|
3881
3959
|
* @since 3.10.0
|
|
3882
3960
|
*/
|
|
3883
|
-
export interface SetFromSelf<Value extends Schema.Any> extends
|
|
3961
|
+
export interface SetFromSelf<Value extends Schema.Any> extends AnnotableDeclare<SetFromSelf<Value>, Set<Schema.Type<Value>>, ReadonlySet<Schema.Encoded<Value>>, [
|
|
3962
|
+
Value
|
|
3963
|
+
]> {
|
|
3884
3964
|
}
|
|
3885
3965
|
/**
|
|
3886
3966
|
* @category Set
|
|
@@ -3891,27 +3971,28 @@ export declare const SetFromSelf: <Value extends Schema.Any>(value: Value) => Se
|
|
|
3891
3971
|
* @category api interface
|
|
3892
3972
|
* @since 3.10.0
|
|
3893
3973
|
*/
|
|
3894
|
-
export interface ReadonlySet$<Value extends Schema.Any> extends
|
|
3974
|
+
export interface ReadonlySet$<Value extends Schema.Any> extends transform<Array$<Value>, ReadonlySetFromSelf<SchemaClass<Schema.Type<Value>>>> {
|
|
3895
3975
|
}
|
|
3896
3976
|
/**
|
|
3897
3977
|
* @category ReadonlySet transformations
|
|
3898
3978
|
* @since 3.10.0
|
|
3899
3979
|
*/
|
|
3900
|
-
export declare
|
|
3980
|
+
export declare function ReadonlySet<Value extends Schema.Any>(value: Value): ReadonlySet$<Value>;
|
|
3901
3981
|
/**
|
|
3902
3982
|
* @category api interface
|
|
3903
3983
|
* @since 3.10.0
|
|
3904
3984
|
*/
|
|
3905
|
-
export interface Set$<Value extends Schema.Any> extends
|
|
3985
|
+
export interface Set$<Value extends Schema.Any> extends transform<Array$<Value>, SetFromSelf<SchemaClass<Schema.Type<Value>>>> {
|
|
3906
3986
|
}
|
|
3907
|
-
|
|
3987
|
+
/** @ignore */
|
|
3988
|
+
declare function set<Value extends Schema.Any>(value: Value): Set$<Value>;
|
|
3908
3989
|
export {
|
|
3909
3990
|
/**
|
|
3910
3991
|
* @category Set transformations
|
|
3911
3992
|
* @since 3.10.0
|
|
3912
3993
|
*/
|
|
3913
3994
|
set as Set };
|
|
3914
|
-
declare const BigDecimalFromSelf_base:
|
|
3995
|
+
declare const BigDecimalFromSelf_base: declare<bigDecimal_.BigDecimal, bigDecimal_.BigDecimal, readonly [], never>;
|
|
3915
3996
|
/**
|
|
3916
3997
|
* @category BigDecimal constructors
|
|
3917
3998
|
* @since 3.10.0
|
|
@@ -3944,7 +4025,7 @@ export declare const GreaterThanBigDecimalSchemaId: unique symbol;
|
|
|
3944
4025
|
* @category BigDecimal filters
|
|
3945
4026
|
* @since 3.10.0
|
|
3946
4027
|
*/
|
|
3947
|
-
export declare const greaterThanBigDecimal: <
|
|
4028
|
+
export declare const greaterThanBigDecimal: <S extends Schema.Any>(min: bigDecimal_.BigDecimal, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigDecimal_.BigDecimal>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3948
4029
|
/**
|
|
3949
4030
|
* @category schema id
|
|
3950
4031
|
* @since 3.10.0
|
|
@@ -3954,7 +4035,7 @@ export declare const GreaterThanOrEqualToBigDecimalSchemaId: unique symbol;
|
|
|
3954
4035
|
* @category BigDecimal filters
|
|
3955
4036
|
* @since 3.10.0
|
|
3956
4037
|
*/
|
|
3957
|
-
export declare const greaterThanOrEqualToBigDecimal: <
|
|
4038
|
+
export declare const greaterThanOrEqualToBigDecimal: <S extends Schema.Any>(min: bigDecimal_.BigDecimal, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigDecimal_.BigDecimal>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3958
4039
|
/**
|
|
3959
4040
|
* @category schema id
|
|
3960
4041
|
* @since 3.10.0
|
|
@@ -3964,7 +4045,7 @@ export declare const LessThanBigDecimalSchemaId: unique symbol;
|
|
|
3964
4045
|
* @category BigDecimal filters
|
|
3965
4046
|
* @since 3.10.0
|
|
3966
4047
|
*/
|
|
3967
|
-
export declare const lessThanBigDecimal: <
|
|
4048
|
+
export declare const lessThanBigDecimal: <S extends Schema.Any>(max: bigDecimal_.BigDecimal, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigDecimal_.BigDecimal>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3968
4049
|
/**
|
|
3969
4050
|
* @category schema id
|
|
3970
4051
|
* @since 3.10.0
|
|
@@ -3974,7 +4055,7 @@ export declare const LessThanOrEqualToBigDecimalSchemaId: unique symbol;
|
|
|
3974
4055
|
* @category BigDecimal filters
|
|
3975
4056
|
* @since 3.10.0
|
|
3976
4057
|
*/
|
|
3977
|
-
export declare const lessThanOrEqualToBigDecimal: <
|
|
4058
|
+
export declare const lessThanOrEqualToBigDecimal: <S extends Schema.Any>(max: bigDecimal_.BigDecimal, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigDecimal_.BigDecimal>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3978
4059
|
/**
|
|
3979
4060
|
* @category schema id
|
|
3980
4061
|
* @since 3.10.0
|
|
@@ -3984,7 +4065,7 @@ export declare const PositiveBigDecimalSchemaId: unique symbol;
|
|
|
3984
4065
|
* @category BigDecimal filters
|
|
3985
4066
|
* @since 3.10.0
|
|
3986
4067
|
*/
|
|
3987
|
-
export declare const positiveBigDecimal: <
|
|
4068
|
+
export declare const positiveBigDecimal: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigDecimal_.BigDecimal>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
3988
4069
|
/**
|
|
3989
4070
|
* @category BigDecimal constructors
|
|
3990
4071
|
* @since 3.10.0
|
|
@@ -3999,7 +4080,7 @@ export declare const NonNegativeBigDecimalSchemaId: unique symbol;
|
|
|
3999
4080
|
* @category BigDecimal filters
|
|
4000
4081
|
* @since 3.10.0
|
|
4001
4082
|
*/
|
|
4002
|
-
export declare const nonNegativeBigDecimal: <
|
|
4083
|
+
export declare const nonNegativeBigDecimal: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigDecimal_.BigDecimal>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
4003
4084
|
/**
|
|
4004
4085
|
* @category BigDecimal constructors
|
|
4005
4086
|
* @since 3.10.0
|
|
@@ -4014,7 +4095,7 @@ export declare const NegativeBigDecimalSchemaId: unique symbol;
|
|
|
4014
4095
|
* @category BigDecimal filters
|
|
4015
4096
|
* @since 3.10.0
|
|
4016
4097
|
*/
|
|
4017
|
-
export declare const negativeBigDecimal: <
|
|
4098
|
+
export declare const negativeBigDecimal: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigDecimal_.BigDecimal>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
4018
4099
|
/**
|
|
4019
4100
|
* @category BigDecimal constructors
|
|
4020
4101
|
* @since 3.10.0
|
|
@@ -4029,7 +4110,7 @@ export declare const NonPositiveBigDecimalSchemaId: unique symbol;
|
|
|
4029
4110
|
* @category BigDecimal filters
|
|
4030
4111
|
* @since 3.10.0
|
|
4031
4112
|
*/
|
|
4032
|
-
export declare const nonPositiveBigDecimal: <
|
|
4113
|
+
export declare const nonPositiveBigDecimal: <S extends Schema.Any>(annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigDecimal_.BigDecimal>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
4033
4114
|
/**
|
|
4034
4115
|
* @category BigDecimal constructors
|
|
4035
4116
|
* @since 3.10.0
|
|
@@ -4044,19 +4125,21 @@ export declare const BetweenBigDecimalSchemaId: unique symbol;
|
|
|
4044
4125
|
* @category BigDecimal filters
|
|
4045
4126
|
* @since 3.10.0
|
|
4046
4127
|
*/
|
|
4047
|
-
export declare const betweenBigDecimal: <
|
|
4128
|
+
export declare const betweenBigDecimal: <S extends Schema.Any>(minimum: bigDecimal_.BigDecimal, maximum: bigDecimal_.BigDecimal, annotations?: Annotations.Filter<Schema.Type<S>>) => <A extends bigDecimal_.BigDecimal>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => filter<S>;
|
|
4048
4129
|
/**
|
|
4049
4130
|
* Clamps a `BigDecimal` between a minimum and a maximum value.
|
|
4050
4131
|
*
|
|
4051
4132
|
* @category BigDecimal transformations
|
|
4052
4133
|
* @since 3.10.0
|
|
4053
4134
|
*/
|
|
4054
|
-
export declare const clampBigDecimal: (minimum: bigDecimal_.BigDecimal, maximum: bigDecimal_.BigDecimal) => <A extends bigDecimal_.BigDecimal
|
|
4135
|
+
export declare const clampBigDecimal: (minimum: bigDecimal_.BigDecimal, maximum: bigDecimal_.BigDecimal) => <S extends Schema.Any, A extends bigDecimal_.BigDecimal>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>) => transform<S, filter<SchemaClass<A>>>;
|
|
4055
4136
|
/**
|
|
4056
4137
|
* @category api interface
|
|
4057
4138
|
* @since 3.10.0
|
|
4058
4139
|
*/
|
|
4059
|
-
export interface ChunkFromSelf<Value extends Schema.Any> extends
|
|
4140
|
+
export interface ChunkFromSelf<Value extends Schema.Any> extends AnnotableDeclare<ChunkFromSelf<Value>, chunk_.Chunk<Schema.Type<Value>>, chunk_.Chunk<Schema.Encoded<Value>>, [
|
|
4141
|
+
Value
|
|
4142
|
+
]> {
|
|
4060
4143
|
}
|
|
4061
4144
|
/**
|
|
4062
4145
|
* @category Chunk
|
|
@@ -4067,18 +4150,20 @@ export declare const ChunkFromSelf: <Value extends Schema.Any>(value: Value) =>
|
|
|
4067
4150
|
* @category api interface
|
|
4068
4151
|
* @since 3.10.0
|
|
4069
4152
|
*/
|
|
4070
|
-
export interface Chunk<Value extends Schema.Any> extends
|
|
4153
|
+
export interface Chunk<Value extends Schema.Any> extends transform<Array$<Value>, ChunkFromSelf<SchemaClass<Schema.Type<Value>>>> {
|
|
4071
4154
|
}
|
|
4072
4155
|
/**
|
|
4073
4156
|
* @category Chunk transformations
|
|
4074
4157
|
* @since 3.10.0
|
|
4075
4158
|
*/
|
|
4076
|
-
export declare
|
|
4159
|
+
export declare function Chunk<Value extends Schema.Any>(value: Value): Chunk<Value>;
|
|
4077
4160
|
/**
|
|
4078
4161
|
* @category api interface
|
|
4079
4162
|
* @since 3.10.0
|
|
4080
4163
|
*/
|
|
4081
|
-
export interface NonEmptyChunkFromSelf<Value extends Schema.Any> extends
|
|
4164
|
+
export interface NonEmptyChunkFromSelf<Value extends Schema.Any> extends AnnotableDeclare<NonEmptyChunkFromSelf<Value>, chunk_.NonEmptyChunk<Schema.Type<Value>>, chunk_.NonEmptyChunk<Schema.Encoded<Value>>, [
|
|
4165
|
+
Value
|
|
4166
|
+
]> {
|
|
4082
4167
|
}
|
|
4083
4168
|
/**
|
|
4084
4169
|
* @category Chunk
|
|
@@ -4089,23 +4174,43 @@ export declare const NonEmptyChunkFromSelf: <Value extends Schema.Any>(value: Va
|
|
|
4089
4174
|
* @category api interface
|
|
4090
4175
|
* @since 3.10.0
|
|
4091
4176
|
*/
|
|
4092
|
-
export interface NonEmptyChunk<Value extends Schema.Any> extends
|
|
4177
|
+
export interface NonEmptyChunk<Value extends Schema.Any> extends transform<NonEmptyArray<Value>, NonEmptyChunkFromSelf<SchemaClass<Schema.Type<Value>>>> {
|
|
4093
4178
|
}
|
|
4094
4179
|
/**
|
|
4095
4180
|
* @category Chunk transformations
|
|
4096
4181
|
* @since 3.10.0
|
|
4097
4182
|
*/
|
|
4098
|
-
export declare
|
|
4183
|
+
export declare function NonEmptyChunk<Value extends Schema.Any>(value: Value): NonEmptyChunk<Value>;
|
|
4099
4184
|
/**
|
|
4185
|
+
* @category api interface
|
|
4186
|
+
* @since 3.13.3
|
|
4187
|
+
*/
|
|
4188
|
+
export interface DataFromSelf<Value extends Schema.Any> extends AnnotableDeclare<DataFromSelf<Value>, Schema.Type<Value>, Schema.Encoded<Value>, [
|
|
4189
|
+
Value
|
|
4190
|
+
]> {
|
|
4191
|
+
}
|
|
4192
|
+
/**
|
|
4193
|
+
* Type and Encoded must extend `Readonly<Record<string, any>> |
|
|
4194
|
+
* ReadonlyArray<any>` to be compatible with this API.
|
|
4195
|
+
*
|
|
4100
4196
|
* @category Data transformations
|
|
4101
4197
|
* @since 3.10.0
|
|
4102
4198
|
*/
|
|
4103
|
-
export declare const DataFromSelf: <
|
|
4199
|
+
export declare const DataFromSelf: <S extends Schema.Any, A extends Readonly<Record<string, unknown>> | ReadonlyArray<unknown>, I extends Readonly<Record<string, unknown>> | ReadonlyArray<unknown>>(value: S & Schema<A & Schema.Type<S>, I & Schema.Encoded<S>, Schema.Context<S>>) => DataFromSelf<S>;
|
|
4200
|
+
/**
|
|
4201
|
+
* @category api interface
|
|
4202
|
+
* @since 3.13.3
|
|
4203
|
+
*/
|
|
4204
|
+
export interface Data<Value extends Schema.Any> extends transform<Value, DataFromSelf<SchemaClass<Schema.Type<Value>>>> {
|
|
4205
|
+
}
|
|
4104
4206
|
/**
|
|
4207
|
+
* Type and Encoded must extend `Readonly<Record<string, any>> |
|
|
4208
|
+
* ReadonlyArray<any>` to be compatible with this API.
|
|
4209
|
+
*
|
|
4105
4210
|
* @category Data transformations
|
|
4106
4211
|
* @since 3.10.0
|
|
4107
4212
|
*/
|
|
4108
|
-
export declare const Data: <
|
|
4213
|
+
export declare const Data: <S extends Schema.Any, A extends Readonly<Record<string, unknown>> | ReadonlyArray<unknown>, I extends Readonly<Record<string, unknown>> | ReadonlyArray<unknown>>(value: S & Schema<A & Schema.Type<S>, I & Schema.Encoded<S>, Schema.Context<S>>) => Data<S>;
|
|
4109
4214
|
type MissingSelfGeneric<Usage extends string, Params extends string = ""> = `Missing \`Self\` generic - use \`class Self extends ${Usage}<Self>()(${Params}{ ... })\``;
|
|
4110
4215
|
type RequiredKeys<T> = {
|
|
4111
4216
|
[K in keyof T]-?: {} extends Pick<T, K> ? never : K;
|
|
@@ -4153,7 +4258,7 @@ export interface Class<Self, Fields extends Struct.Fields, I, R, C, Inherited, P
|
|
|
4153
4258
|
* }
|
|
4154
4259
|
* ```
|
|
4155
4260
|
*/
|
|
4156
|
-
extend<Extended = never>(identifier: string): <NewFields extends Struct.Fields>(fields: NewFields | HasFields<NewFields>, annotations?: ClassAnnotations<Extended, Struct.Type<Fields & NewFields
|
|
4261
|
+
extend<Extended = never>(identifier: string): <NewFields extends Struct.Fields>(fields: NewFields | HasFields<NewFields>, annotations?: ClassAnnotations<Extended, Simplify<Struct.Type<Fields & NewFields>>>) => [Extended] extends [never] ? MissingSelfGeneric<"Base.extend"> : Class<Extended, Fields & NewFields, I & Struct.Encoded<NewFields>, R | Struct.Context<NewFields>, C & Struct.Constructor<NewFields>, Self, Proto>;
|
|
4157
4262
|
/**
|
|
4158
4263
|
* @example
|
|
4159
4264
|
* ```ts
|
|
@@ -4186,7 +4291,7 @@ export interface Class<Self, Fields extends Struct.Fields, I, R, C, Inherited, P
|
|
|
4186
4291
|
transformOrFail<Transformed = never>(identifier: string): <NewFields extends Struct.Fields, R2, R3>(fields: NewFields, options: {
|
|
4187
4292
|
readonly decode: (input: Simplify<Struct.Type<Fields>>, options: ParseOptions, ast: AST.Transformation) => Effect.Effect<Simplify<Struct.Type<Fields & NewFields>>, ParseResult.ParseIssue, R2>;
|
|
4188
4293
|
readonly encode: (input: Simplify<Struct.Type<Fields & NewFields>>, options: ParseOptions, ast: AST.Transformation) => Effect.Effect<Struct.Type<Fields>, ParseResult.ParseIssue, R3>;
|
|
4189
|
-
}, annotations?: ClassAnnotations<Transformed, Struct.Type<Fields & NewFields
|
|
4294
|
+
}, annotations?: ClassAnnotations<Transformed, Simplify<Struct.Type<Fields & NewFields>>>) => [Transformed] extends [never] ? MissingSelfGeneric<"Base.transformOrFail"> : Class<Transformed, Fields & NewFields, I, R | Struct.Context<NewFields> | R2 | R3, C & Struct.Constructor<NewFields>, Self, Proto>;
|
|
4190
4295
|
/**
|
|
4191
4296
|
* @example
|
|
4192
4297
|
* ```ts
|
|
@@ -4219,7 +4324,7 @@ export interface Class<Self, Fields extends Struct.Fields, I, R, C, Inherited, P
|
|
|
4219
4324
|
transformOrFailFrom<Transformed = never>(identifier: string): <NewFields extends Struct.Fields, R2, R3>(fields: NewFields, options: {
|
|
4220
4325
|
readonly decode: (input: Simplify<I>, options: ParseOptions, ast: AST.Transformation) => Effect.Effect<Simplify<I & Struct.Encoded<NewFields>>, ParseResult.ParseIssue, R2>;
|
|
4221
4326
|
readonly encode: (input: Simplify<I & Struct.Encoded<NewFields>>, options: ParseOptions, ast: AST.Transformation) => Effect.Effect<I, ParseResult.ParseIssue, R3>;
|
|
4222
|
-
}, annotations?: ClassAnnotations<Transformed, Struct.Type<Fields & NewFields
|
|
4327
|
+
}, annotations?: ClassAnnotations<Transformed, Simplify<Struct.Type<Fields & NewFields>>>) => [Transformed] extends [never] ? MissingSelfGeneric<"Base.transformOrFailFrom"> : Class<Transformed, Fields & NewFields, I, R | Struct.Context<NewFields> | R2 | R3, C & Struct.Constructor<NewFields>, Self, Proto>;
|
|
4223
4328
|
}
|
|
4224
4329
|
type HasFields<Fields extends Struct.Fields> = Struct<Fields> | {
|
|
4225
4330
|
readonly [RefineSchemaId]: HasFields<Fields>;
|
|
@@ -4241,7 +4346,7 @@ type HasFields<Fields extends Struct.Fields> = Struct<Fields> | {
|
|
|
4241
4346
|
* @category classes
|
|
4242
4347
|
* @since 3.10.0
|
|
4243
4348
|
*/
|
|
4244
|
-
export declare const Class: <Self = never>(identifier: string) => <Fields extends Struct.Fields>(fieldsOr: Fields | HasFields<Fields>, annotations?: ClassAnnotations<Self, Struct.Type<Fields
|
|
4349
|
+
export declare const Class: <Self = never>(identifier: string) => <Fields extends Struct.Fields>(fieldsOr: Fields | HasFields<Fields>, annotations?: ClassAnnotations<Self, Simplify<Struct.Type<Fields>>>) => [Self] extends [never] ? MissingSelfGeneric<"Class"> : Class<Self, Fields, Struct.Encoded<Fields>, Struct.Context<Fields>, Struct.Constructor<Fields>, {}, {}>;
|
|
4245
4350
|
/**
|
|
4246
4351
|
* @category api interface
|
|
4247
4352
|
* @since 3.10.0
|
|
@@ -4262,9 +4367,9 @@ export interface TaggedClass<Self, Tag extends string, Fields extends Struct.Fie
|
|
|
4262
4367
|
* @category classes
|
|
4263
4368
|
* @since 3.10.0
|
|
4264
4369
|
*/
|
|
4265
|
-
export declare const TaggedClass: <Self = never>(identifier?: string) => <Tag extends string, Fields extends Struct.Fields>(tag: Tag, fieldsOr: Fields | HasFields<Fields>, annotations?: ClassAnnotations<Self, Struct.Type<{
|
|
4370
|
+
export declare const TaggedClass: <Self = never>(identifier?: string) => <Tag extends string, Fields extends Struct.Fields>(tag: Tag, fieldsOr: Fields | HasFields<Fields>, annotations?: ClassAnnotations<Self, Simplify<Struct.Type<{
|
|
4266
4371
|
readonly _tag: tag<Tag>;
|
|
4267
|
-
} & Fields
|
|
4372
|
+
} & Fields>>>) => [Self] extends [never] ? MissingSelfGeneric<"TaggedClass", `"Tag", `> : TaggedClass<Self, Tag, {
|
|
4268
4373
|
readonly _tag: tag<Tag>;
|
|
4269
4374
|
} & Fields>;
|
|
4270
4375
|
/**
|
|
@@ -4295,13 +4400,17 @@ export interface TaggedErrorClass<Self, Tag extends string, Fields extends Struc
|
|
|
4295
4400
|
* @category classes
|
|
4296
4401
|
* @since 3.10.0
|
|
4297
4402
|
*/
|
|
4298
|
-
export declare const TaggedError: <Self = never>(identifier?: string) => <Tag extends string, Fields extends Struct.Fields>(tag: Tag, fieldsOr: Fields | HasFields<Fields>, annotations?: ClassAnnotations<Self, Struct.Type<{
|
|
4403
|
+
export declare const TaggedError: <Self = never>(identifier?: string) => <Tag extends string, Fields extends Struct.Fields>(tag: Tag, fieldsOr: Fields | HasFields<Fields>, annotations?: ClassAnnotations<Self, Simplify<Struct.Type<{
|
|
4299
4404
|
readonly _tag: tag<Tag>;
|
|
4300
|
-
} & Fields
|
|
4405
|
+
} & Fields>>>) => [Self] extends [never] ? MissingSelfGeneric<"TaggedError", `"Tag", `> : TaggedErrorClass<Self, Tag, {
|
|
4301
4406
|
readonly _tag: tag<Tag>;
|
|
4302
4407
|
} & Fields>;
|
|
4303
|
-
|
|
4304
|
-
|
|
4408
|
+
/**
|
|
4409
|
+
* @category Constructor utils
|
|
4410
|
+
* @since 3.13.4
|
|
4411
|
+
*/
|
|
4412
|
+
export type MakeOptions = boolean | {
|
|
4413
|
+
readonly disableValidation?: boolean | undefined;
|
|
4305
4414
|
};
|
|
4306
4415
|
/**
|
|
4307
4416
|
* @category FiberId
|
|
@@ -4318,7 +4427,7 @@ export type FiberIdEncoded = {
|
|
|
4318
4427
|
readonly id: number;
|
|
4319
4428
|
readonly startTimeMillis: number;
|
|
4320
4429
|
};
|
|
4321
|
-
declare const FiberIdFromSelf_base:
|
|
4430
|
+
declare const FiberIdFromSelf_base: declare<fiberId_.FiberId, fiberId_.FiberId, readonly [], never>;
|
|
4322
4431
|
/**
|
|
4323
4432
|
* @category FiberId constructors
|
|
4324
4433
|
* @since 3.10.0
|
|
@@ -4360,7 +4469,10 @@ export type CauseEncoded<E, D> = {
|
|
|
4360
4469
|
* @category api interface
|
|
4361
4470
|
* @since 3.10.0
|
|
4362
4471
|
*/
|
|
4363
|
-
export interface CauseFromSelf<E extends Schema.All, D extends Schema.All> extends
|
|
4472
|
+
export interface CauseFromSelf<E extends Schema.All, D extends Schema.All> extends AnnotableDeclare<CauseFromSelf<E, D>, cause_.Cause<Schema.Type<E>>, cause_.Cause<Schema.Encoded<E>>, [
|
|
4473
|
+
E,
|
|
4474
|
+
D
|
|
4475
|
+
]> {
|
|
4364
4476
|
}
|
|
4365
4477
|
/**
|
|
4366
4478
|
* @category Cause transformations
|
|
@@ -4374,7 +4486,7 @@ export declare const CauseFromSelf: <E extends Schema.All, D extends Schema.All>
|
|
|
4374
4486
|
* @category api interface
|
|
4375
4487
|
* @since 3.10.0
|
|
4376
4488
|
*/
|
|
4377
|
-
export interface Cause<E extends Schema.All, D extends Schema.All> extends
|
|
4489
|
+
export interface Cause<E extends Schema.All, D extends Schema.All> extends transform<SchemaClass<CauseEncoded<Schema.Type<E>, Schema.Type<Defect>>, CauseEncoded<Schema.Encoded<E>, Schema.Encoded<Defect>>, Schema.Context<E> | Schema.Context<D>>, CauseFromSelf<SchemaClass<Schema.Type<E>>, SchemaClass<Schema.Type<D>>>> {
|
|
4378
4490
|
}
|
|
4379
4491
|
/**
|
|
4380
4492
|
* @category Cause transformations
|
|
@@ -4384,12 +4496,7 @@ export declare const Cause: <E extends Schema.All, D extends Schema.All>({ defec
|
|
|
4384
4496
|
readonly error: E;
|
|
4385
4497
|
readonly defect: D;
|
|
4386
4498
|
}) => Cause<E, D>;
|
|
4387
|
-
|
|
4388
|
-
* @category api interface
|
|
4389
|
-
* @since 3.10.0
|
|
4390
|
-
*/
|
|
4391
|
-
export interface Defect extends transform<typeof Unknown, typeof Unknown> {
|
|
4392
|
-
}
|
|
4499
|
+
declare const Defect_base: transform<typeof Unknown, typeof Unknown>;
|
|
4393
4500
|
/**
|
|
4394
4501
|
* Defines a schema for handling JavaScript errors (`Error` instances) and other types of defects.
|
|
4395
4502
|
* It decodes objects into Error instances if they match the expected structure (i.e., have a `message` and optionally a `name` and `stack`),
|
|
@@ -4403,7 +4510,8 @@ export interface Defect extends transform<typeof Unknown, typeof Unknown> {
|
|
|
4403
4510
|
* @category defect
|
|
4404
4511
|
* @since 3.10.0
|
|
4405
4512
|
*/
|
|
4406
|
-
export declare
|
|
4513
|
+
export declare class Defect extends Defect_base {
|
|
4514
|
+
}
|
|
4407
4515
|
/**
|
|
4408
4516
|
* @category Exit utils
|
|
4409
4517
|
* @since 3.10.0
|
|
@@ -4419,7 +4527,11 @@ export type ExitEncoded<A, E, D> = {
|
|
|
4419
4527
|
* @category api interface
|
|
4420
4528
|
* @since 3.10.0
|
|
4421
4529
|
*/
|
|
4422
|
-
export interface ExitFromSelf<A extends Schema.All, E extends Schema.All, D extends Schema.All> extends
|
|
4530
|
+
export interface ExitFromSelf<A extends Schema.All, E extends Schema.All, D extends Schema.All> extends AnnotableDeclare<ExitFromSelf<A, E, D>, exit_.Exit<Schema.Type<A>, Schema.Type<E>>, exit_.Exit<Schema.Encoded<A>, Schema.Encoded<E>>, [
|
|
4531
|
+
A,
|
|
4532
|
+
E,
|
|
4533
|
+
D
|
|
4534
|
+
]> {
|
|
4423
4535
|
}
|
|
4424
4536
|
/**
|
|
4425
4537
|
* @category Exit transformations
|
|
@@ -4434,7 +4546,16 @@ export declare const ExitFromSelf: <A extends Schema.All, E extends Schema.All,
|
|
|
4434
4546
|
* @category api interface
|
|
4435
4547
|
* @since 3.10.0
|
|
4436
4548
|
*/
|
|
4437
|
-
export interface Exit<A extends Schema.All, E extends Schema.All, D extends Schema.All> extends
|
|
4549
|
+
export interface Exit<A extends Schema.All, E extends Schema.All, D extends Schema.All> extends transform<Union<[
|
|
4550
|
+
Struct<{
|
|
4551
|
+
_tag: Literal<["Failure"]>;
|
|
4552
|
+
cause: SchemaClass<CauseEncoded<Schema.Type<E>, Schema.Type<D>>, CauseEncoded<Schema.Encoded<E>, Schema.Encoded<D>>, Schema.Context<E> | Schema.Context<D>>;
|
|
4553
|
+
}>,
|
|
4554
|
+
Struct<{
|
|
4555
|
+
_tag: Literal<["Success"]>;
|
|
4556
|
+
value: A;
|
|
4557
|
+
}>
|
|
4558
|
+
]>, ExitFromSelf<SchemaClass<Schema.Type<A>>, SchemaClass<Schema.Type<E>>, SchemaClass<Schema.Type<D>>>> {
|
|
4438
4559
|
}
|
|
4439
4560
|
/**
|
|
4440
4561
|
* @category Exit transformations
|
|
@@ -4449,7 +4570,9 @@ export declare const Exit: <A extends Schema.All, E extends Schema.All, D extend
|
|
|
4449
4570
|
* @category api interface
|
|
4450
4571
|
* @since 3.10.0
|
|
4451
4572
|
*/
|
|
4452
|
-
export interface HashSetFromSelf<Value extends Schema.Any> extends
|
|
4573
|
+
export interface HashSetFromSelf<Value extends Schema.Any> extends AnnotableDeclare<HashSetFromSelf<Value>, hashSet_.HashSet<Schema.Type<Value>>, hashSet_.HashSet<Schema.Encoded<Value>>, [
|
|
4574
|
+
Value
|
|
4575
|
+
]> {
|
|
4453
4576
|
}
|
|
4454
4577
|
/**
|
|
4455
4578
|
* @category HashSet transformations
|
|
@@ -4460,18 +4583,21 @@ export declare const HashSetFromSelf: <Value extends Schema.Any>(value: Value) =
|
|
|
4460
4583
|
* @category api interface
|
|
4461
4584
|
* @since 3.10.0
|
|
4462
4585
|
*/
|
|
4463
|
-
export interface HashSet<Value extends Schema.Any> extends
|
|
4586
|
+
export interface HashSet<Value extends Schema.Any> extends transform<Array$<Value>, HashSetFromSelf<SchemaClass<Schema.Type<Value>>>> {
|
|
4464
4587
|
}
|
|
4465
4588
|
/**
|
|
4466
4589
|
* @category HashSet transformations
|
|
4467
4590
|
* @since 3.10.0
|
|
4468
4591
|
*/
|
|
4469
|
-
export declare
|
|
4592
|
+
export declare function HashSet<Value extends Schema.Any>(value: Value): HashSet<Value>;
|
|
4470
4593
|
/**
|
|
4471
4594
|
* @category api interface
|
|
4472
4595
|
* @since 3.10.0
|
|
4473
4596
|
*/
|
|
4474
|
-
export interface HashMapFromSelf<K extends Schema.Any, V extends Schema.Any> extends
|
|
4597
|
+
export interface HashMapFromSelf<K extends Schema.Any, V extends Schema.Any> extends AnnotableDeclare<HashMapFromSelf<K, V>, hashMap_.HashMap<Schema.Type<K>, Schema.Type<V>>, hashMap_.HashMap<Schema.Encoded<K>, Schema.Encoded<V>>, [
|
|
4598
|
+
K,
|
|
4599
|
+
V
|
|
4600
|
+
]> {
|
|
4475
4601
|
}
|
|
4476
4602
|
/**
|
|
4477
4603
|
* @category HashMap transformations
|
|
@@ -4485,7 +4611,7 @@ export declare const HashMapFromSelf: <K extends Schema.Any, V extends Schema.An
|
|
|
4485
4611
|
* @category api interface
|
|
4486
4612
|
* @since 3.10.0
|
|
4487
4613
|
*/
|
|
4488
|
-
export interface HashMap<K extends Schema.Any, V extends Schema.Any> extends
|
|
4614
|
+
export interface HashMap<K extends Schema.Any, V extends Schema.Any> extends transform<Array$<Tuple2<K, V>>, HashMapFromSelf<SchemaClass<Schema.Type<K>>, SchemaClass<Schema.Type<V>>>> {
|
|
4489
4615
|
}
|
|
4490
4616
|
/**
|
|
4491
4617
|
* @category HashMap transformations
|
|
@@ -4499,7 +4625,9 @@ export declare const HashMap: <K extends Schema.Any, V extends Schema.Any>({ key
|
|
|
4499
4625
|
* @category api interface
|
|
4500
4626
|
* @since 3.10.0
|
|
4501
4627
|
*/
|
|
4502
|
-
export interface ListFromSelf<Value extends Schema.Any> extends
|
|
4628
|
+
export interface ListFromSelf<Value extends Schema.Any> extends AnnotableDeclare<ListFromSelf<Value>, list_.List<Schema.Type<Value>>, list_.List<Schema.Encoded<Value>>, [
|
|
4629
|
+
Value
|
|
4630
|
+
]> {
|
|
4503
4631
|
}
|
|
4504
4632
|
/**
|
|
4505
4633
|
* @category List transformations
|
|
@@ -4510,18 +4638,20 @@ export declare const ListFromSelf: <Value extends Schema.Any>(value: Value) => L
|
|
|
4510
4638
|
* @category api interface
|
|
4511
4639
|
* @since 3.10.0
|
|
4512
4640
|
*/
|
|
4513
|
-
export interface List<Value extends Schema.Any> extends
|
|
4641
|
+
export interface List<Value extends Schema.Any> extends transform<Array$<Value>, ListFromSelf<SchemaClass<Schema.Type<Value>>>> {
|
|
4514
4642
|
}
|
|
4515
4643
|
/**
|
|
4516
4644
|
* @category List transformations
|
|
4517
4645
|
* @since 3.10.0
|
|
4518
4646
|
*/
|
|
4519
|
-
export declare
|
|
4647
|
+
export declare function List<Value extends Schema.Any>(value: Value): List<Value>;
|
|
4520
4648
|
/**
|
|
4521
4649
|
* @category api interface
|
|
4522
4650
|
* @since 3.10.0
|
|
4523
4651
|
*/
|
|
4524
|
-
export interface SortedSetFromSelf<Value extends Schema.Any> extends
|
|
4652
|
+
export interface SortedSetFromSelf<Value extends Schema.Any> extends AnnotableDeclare<SortedSetFromSelf<Value>, sortedSet_.SortedSet<Schema.Type<Value>>, sortedSet_.SortedSet<Schema.Encoded<Value>>, [
|
|
4653
|
+
Value
|
|
4654
|
+
]> {
|
|
4525
4655
|
}
|
|
4526
4656
|
/**
|
|
4527
4657
|
* @category SortedSet transformations
|
|
@@ -4532,13 +4662,13 @@ export declare const SortedSetFromSelf: <Value extends Schema.Any>(value: Value,
|
|
|
4532
4662
|
* @category api interface
|
|
4533
4663
|
* @since 3.10.0
|
|
4534
4664
|
*/
|
|
4535
|
-
export interface SortedSet<Value extends Schema.Any> extends
|
|
4665
|
+
export interface SortedSet<Value extends Schema.Any> extends transform<Array$<Value>, SortedSetFromSelf<SchemaClass<Schema.Type<Value>>>> {
|
|
4536
4666
|
}
|
|
4537
4667
|
/**
|
|
4538
4668
|
* @category SortedSet transformations
|
|
4539
4669
|
* @since 3.10.0
|
|
4540
4670
|
*/
|
|
4541
|
-
export declare
|
|
4671
|
+
export declare function SortedSet<Value extends Schema.Any>(value: Value, ordA: Order.Order<Schema.Type<Value>>): SortedSet<Value>;
|
|
4542
4672
|
declare const BooleanFromUnknown_base: transform<typeof Unknown, typeof Boolean$>;
|
|
4543
4673
|
/**
|
|
4544
4674
|
* Converts an arbitrary value to a `boolean` by testing whether it is truthy.
|
|
@@ -4888,9 +5018,9 @@ export declare const TaggedRequest: <Self = never>(identifier?: string) => <Tag
|
|
|
4888
5018
|
failure: Failure;
|
|
4889
5019
|
success: Success;
|
|
4890
5020
|
payload: Payload;
|
|
4891
|
-
}, annotations?: ClassAnnotations<Self, Struct.Type<{
|
|
5021
|
+
}, annotations?: ClassAnnotations<Self, Simplify<Struct.Type<{
|
|
4892
5022
|
readonly _tag: tag<Tag>;
|
|
4893
|
-
} & Payload
|
|
5023
|
+
} & Payload>>>) => [Self] extends [never] ? MissingSelfGeneric<"TaggedRequest", `"Tag", SuccessSchema, FailureSchema, `> : TaggedRequestClass<Self, Tag, {
|
|
4894
5024
|
readonly _tag: tag<Tag>;
|
|
4895
5025
|
} & Payload, Success, Failure>;
|
|
4896
5026
|
/**
|