arktype 2.0.0-rc.8 → 2.0.0-rc.9
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/out/config.d.ts +1 -1
- package/out/generic.d.ts +6 -6
- package/out/generic.js +2 -2
- package/out/index.d.ts +1 -1
- package/out/index.js +1 -1
- package/out/keywords/constructors/Array.d.ts +1 -1
- package/out/keywords/constructors/Date.d.ts +1 -1
- package/out/keywords/constructors/FormData.d.ts +1 -1
- package/out/keywords/{ast.d.ts → inference.d.ts} +42 -20
- package/out/keywords/{ark.d.ts → keywords.d.ts} +3 -3
- package/out/keywords/{ark.js → keywords.js} +7 -7
- package/out/keywords/number/number.d.ts +1 -1
- package/out/keywords/string/alpha.d.ts +1 -1
- package/out/keywords/string/alphanumeric.d.ts +1 -1
- package/out/keywords/string/capitalize.d.ts +1 -1
- package/out/keywords/string/creditCard.d.ts +1 -1
- package/out/keywords/string/date.d.ts +1 -1
- package/out/keywords/string/digits.d.ts +1 -1
- package/out/keywords/string/email.d.ts +1 -1
- package/out/keywords/string/integer.d.ts +1 -1
- package/out/keywords/string/ip.d.ts +1 -1
- package/out/keywords/string/json.d.ts +1 -1
- package/out/keywords/string/lower.d.ts +1 -1
- package/out/keywords/string/normalize.d.ts +1 -1
- package/out/keywords/string/numeric.d.ts +1 -1
- package/out/keywords/string/semver.d.ts +1 -1
- package/out/keywords/string/string.d.ts +7 -7
- package/out/keywords/string/trim.d.ts +1 -1
- package/out/keywords/string/upper.d.ts +1 -1
- package/out/keywords/string/url.d.ts +1 -1
- package/out/keywords/string/uuid.d.ts +1 -1
- package/out/methods/array.d.ts +1 -1
- package/out/methods/base.d.ts +24 -23
- package/out/methods/date.d.ts +1 -1
- package/out/methods/instantiate.d.ts +3 -3
- package/out/methods/morph.d.ts +3 -4
- package/out/methods/number.d.ts +1 -1
- package/out/methods/object.d.ts +55 -30
- package/out/methods/string.d.ts +1 -1
- package/out/methods/validator.d.ts +1 -1
- package/out/parser/{semantic → ast}/bounds.d.ts +3 -3
- package/out/parser/{semantic → ast}/default.d.ts +2 -2
- package/out/parser/{semantic → ast}/infer.d.ts +4 -6
- package/out/parser/{semantic → ast}/utils.d.ts +1 -1
- package/out/parser/{semantic → ast}/validate.d.ts +4 -4
- package/out/parser/definition.d.ts +3 -3
- package/out/parser/objectLiteral.d.ts +3 -3
- package/out/parser/{string/reduce → reduce}/dynamic.d.ts +2 -2
- package/out/parser/{string/reduce → reduce}/shared.d.ts +1 -1
- package/out/parser/{string/reduce → reduce}/static.d.ts +1 -1
- package/out/parser/{string/shift → shift}/operand/date.d.ts +1 -1
- package/out/parser/{string/shift → shift}/operand/enclosed.d.ts +3 -3
- package/out/parser/{string/shift → shift}/operand/unenclosed.d.ts +3 -3
- package/out/parser/{string/shift → shift}/operand/unenclosed.js +1 -1
- package/out/parser/{string/shift → shift}/operator/bounds.d.ts +3 -3
- package/out/parser/{string/shift → shift}/operator/default.d.ts +1 -1
- package/out/parser/{string/string.d.ts → string.d.ts} +3 -3
- package/out/parser/tuple.d.ts +7 -8
- package/out/parser/tuple.js +1 -1
- package/out/scope.d.ts +2 -2
- package/out/scope.js +4 -4
- package/out/type.d.ts +5 -5
- package/out/type.js +1 -1
- package/package.json +3 -3
- package/out/intersect.d.ts +0 -26
- package/out/intersect.js +0 -1
- package/out/keys.d.ts +0 -18
- package/out/keys.js +0 -1
- /package/out/keywords/{ast.js → inference.js} +0 -0
- /package/out/parser/{semantic → ast}/bounds.js +0 -0
- /package/out/parser/{semantic → ast}/default.js +0 -0
- /package/out/parser/{semantic → ast}/divisor.d.ts +0 -0
- /package/out/parser/{semantic → ast}/divisor.js +0 -0
- /package/out/parser/{semantic → ast}/infer.js +0 -0
- /package/out/parser/{semantic → ast}/keyof.d.ts +0 -0
- /package/out/parser/{semantic → ast}/keyof.js +0 -0
- /package/out/parser/{semantic → ast}/utils.js +0 -0
- /package/out/parser/{semantic → ast}/validate.js +0 -0
- /package/out/parser/{string/reduce → reduce}/dynamic.js +0 -0
- /package/out/parser/{string/reduce → reduce}/shared.js +0 -0
- /package/out/parser/{string/reduce → reduce}/static.js +0 -0
- /package/out/parser/{string/shift → shift}/operand/date.js +0 -0
- /package/out/parser/{string/shift → shift}/operand/enclosed.js +0 -0
- /package/out/parser/{string/shift → shift}/operand/genericArgs.d.ts +0 -0
- /package/out/parser/{string/shift → shift}/operand/genericArgs.js +0 -0
- /package/out/parser/{string/shift → shift}/operand/operand.d.ts +0 -0
- /package/out/parser/{string/shift → shift}/operand/operand.js +0 -0
- /package/out/parser/{string/shift → shift}/operator/bounds.js +0 -0
- /package/out/parser/{string/shift → shift}/operator/default.js +0 -0
- /package/out/parser/{string/shift → shift}/operator/divisor.d.ts +0 -0
- /package/out/parser/{string/shift → shift}/operator/divisor.js +0 -0
- /package/out/parser/{string/shift → shift}/operator/operator.d.ts +0 -0
- /package/out/parser/{string/shift → shift}/operator/operator.js +0 -0
- /package/out/parser/{string/shift → shift}/scanner.d.ts +0 -0
- /package/out/parser/{string/shift → shift}/scanner.js +0 -0
- /package/out/parser/{string/string.js → string.js} +0 -0
package/out/config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ArkSchemaRegistry } from "@ark/schema";
|
|
2
|
-
import type { Ark } from "./keywords/
|
|
2
|
+
import type { Ark } from "./keywords/keywords.ts";
|
|
3
3
|
import type { exportScope } from "./module.ts";
|
|
4
4
|
export * from "@ark/schema/config";
|
|
5
5
|
export interface ArkTypeRegistryContents extends ArkSchemaRegistry {
|
package/out/generic.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { GenericRoot, type arkKind, type BaseParseContext, type GenericAst, type GenericParamAst, type GenericParamDef, type genericParamNames, type LazyGenericBody } from "@ark/schema";
|
|
2
2
|
import { type array, type Callable, type conform, type ErrorMessage, type ErrorType, type Hkt, type Json, type WhiteSpaceToken } from "@ark/util";
|
|
3
|
-
import type { type } from "./keywords/
|
|
3
|
+
import type { type } from "./keywords/keywords.ts";
|
|
4
|
+
import type { inferAstRoot } from "./parser/ast/infer.ts";
|
|
5
|
+
import type { validateAst } from "./parser/ast/validate.ts";
|
|
4
6
|
import type { inferDefinition, validateDefinition } from "./parser/definition.ts";
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import
|
|
8
|
-
import type { Scanner } from "./parser/string/shift/scanner.ts";
|
|
9
|
-
import { parseUntilFinalizer } from "./parser/string/string.ts";
|
|
7
|
+
import type { state, StaticState } from "./parser/reduce/static.ts";
|
|
8
|
+
import type { Scanner } from "./parser/shift/scanner.ts";
|
|
9
|
+
import { parseUntilFinalizer } from "./parser/string.ts";
|
|
10
10
|
import type { Scope } from "./scope.ts";
|
|
11
11
|
import type { Type } from "./type.ts";
|
|
12
12
|
export type ParameterString<params extends string = string> = `<${params}>`;
|
package/out/generic.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GenericRoot } from "@ark/schema";
|
|
2
2
|
import { throwParseError } from "@ark/util";
|
|
3
|
-
import { DynamicState } from "./parser/
|
|
4
|
-
import { parseUntilFinalizer } from "./parser/string
|
|
3
|
+
import { DynamicState } from "./parser/reduce/dynamic.js";
|
|
4
|
+
import { parseUntilFinalizer } from "./parser/string.js";
|
|
5
5
|
export const Generic = GenericRoot;
|
|
6
6
|
export const emptyGenericParameterMessage = "An empty string is not a valid generic parameter name";
|
|
7
7
|
export const parseGenericParamName = (scanner, result, ctx) => {
|
package/out/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ArkError, ArkErrors, type ArkConfig, type ArkScopeConfig, type JsonSchema } from "@ark/schema";
|
|
2
2
|
export { Hkt, inferred } from "@ark/util";
|
|
3
3
|
export { Generic } from "./generic.ts";
|
|
4
|
-
export {
|
|
4
|
+
export { ark, declare, define, generic, keywords, type, type Ark } from "./keywords/keywords.ts";
|
|
5
5
|
export { Module, type BoundModule, type Submodule } from "./module.ts";
|
|
6
6
|
export { module, scope, type Scope } from "./scope.ts";
|
|
7
7
|
export { Type } from "./type.ts";
|
package/out/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ArkError, ArkErrors } from "@ark/schema";
|
|
2
2
|
export { Hkt, inferred } from "@ark/util";
|
|
3
3
|
export { Generic } from "./generic.js";
|
|
4
|
-
export {
|
|
4
|
+
export { ark, declare, define, generic, keywords, type } from "./keywords/keywords.js";
|
|
5
5
|
export { Module } from "./module.js";
|
|
6
6
|
export { module, scope } from "./scope.js";
|
|
7
7
|
export { Type } from "./type.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Hkt, liftArray, type Digit } from "@ark/util";
|
|
2
2
|
import type { Module, Submodule } from "../../module.ts";
|
|
3
|
-
import type { To } from "../
|
|
3
|
+
import type { To } from "../inference.ts";
|
|
4
4
|
declare class liftFromHkt extends Hkt<[element: unknown]> {
|
|
5
5
|
body: liftArray<this[0]> extends infer lifted ? (In: this[0] | lifted) => To<lifted> : never;
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Branded, constrain, constraint, Constraints, Literal, Narrowed, normalizeLimit, Optional } from "../
|
|
1
|
+
import type { Branded, constrain, constraint, Constraints, Literal, Narrowed, normalizeLimit, Optional } from "../inference.ts";
|
|
2
2
|
export type AtOrAfter<rule> = {
|
|
3
3
|
atOrAfter: constraint<rule>;
|
|
4
4
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Module, Submodule } from "../../module.ts";
|
|
2
|
-
import type { To } from "../
|
|
2
|
+
import type { To } from "../inference.ts";
|
|
3
3
|
export type FormDataValue = string | File;
|
|
4
4
|
export type ParsedFormData = Record<string, FormDataValue | FormDataValue[]>;
|
|
5
5
|
export declare const arkFormData: arkFormData.module;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { ArkError, ArkErrors, Constraint, constraintKindOf, Morph, NodeSchema } from "@ark/schema";
|
|
2
|
-
import { type anyOrNever, type array, type conform, type equals, type isSafelyMappable, type leftIfEqual, type objectKindOf, type Primitive, type show } from "@ark/util";
|
|
3
|
-
import type { inferPipe } from "../intersect.ts";
|
|
2
|
+
import { type anyOrNever, type array, type conform, type equals, type Hkt, type intersectArrays, type isSafelyMappable, type leftIfEqual, type objectKindOf, type Primitive, type show } from "@ark/util";
|
|
4
3
|
import type { Type } from "../type.ts";
|
|
5
|
-
import type { type } from "./ark.ts";
|
|
6
4
|
import type { arkPrototypes } from "./constructors/constructors.ts";
|
|
7
5
|
import type { Date } from "./constructors/Date.ts";
|
|
6
|
+
import type { type } from "./keywords.ts";
|
|
8
7
|
import type { DivisibleBy, number } from "./number/number.ts";
|
|
9
8
|
import type { Matching, string } from "./string/string.ts";
|
|
10
9
|
export type { arkPrototypes as object } from "./constructors/constructors.ts";
|
|
@@ -53,7 +52,7 @@ export type ExactlyLength<rule> = {
|
|
|
53
52
|
atLeastLength: constraint<rule>;
|
|
54
53
|
atMostLength: constraint<rule>;
|
|
55
54
|
};
|
|
56
|
-
export type applyConstraintSchema<t, kind extends Constraint.PrimitiveKind, schema extends NodeSchema<kind>> = t extends
|
|
55
|
+
export type applyConstraintSchema<t, kind extends Constraint.PrimitiveKind, schema extends NodeSchema<kind>> = t extends InferredMorph<infer i, infer o> ? (In: leftIfEqual<i, applyConstraint<i, schemaToConstraint<kind, schema>>>) => o : leftIfEqual<t, applyConstraint<t, schemaToConstraint<kind, schema>>>;
|
|
57
56
|
export type applyConstraint<t, constraint> = parseConstraints<t> extends ([
|
|
58
57
|
infer base,
|
|
59
58
|
infer constraints extends Constraints
|
|
@@ -152,25 +151,25 @@ export type includesMorphs<t> = [
|
|
|
152
151
|
type _distill<t, opts extends distill.Options> = t extends undefined ? t : [t] extends [anyOrNever] ? t : parseConstraints<t> extends ([
|
|
153
152
|
infer base,
|
|
154
153
|
infer constraints extends Constraints
|
|
155
|
-
]) ? opts["branded"] extends true ? constrain<_distill<base, opts>, constraints> : _distill<base, opts> : unknown extends t ? unknown : t extends TerminallyInferredObject | Primitive ? t : t extends
|
|
154
|
+
]) ? opts["branded"] extends true ? constrain<_distill<base, opts>, constraints> : _distill<base, opts> : unknown extends t ? unknown : t extends TerminallyInferredObject | Primitive ? t : t extends InferredMorph<infer i, infer o> ? opts["branded"] extends true ? distillIo<i, o, opts> : distillUnbrandedIo<t, i, o, opts> : t extends array ? distillArray<t, opts> : t extends InferredDefault<infer t> ? _distill<t, opts> : t extends Function ? t : isSafelyMappable<t> extends true ? distillMappable<t, opts> : t;
|
|
156
155
|
type distillMappable<o, opts extends distill.Options> = opts["endpoint"] extends "in" ? show<{
|
|
157
|
-
[k in keyof o as k extends
|
|
156
|
+
[k in keyof o as k extends inferredOptionalOrDefaultKeyOf<o> ? never : k]: _distill<o[k], opts>;
|
|
158
157
|
} & {
|
|
159
|
-
[k in
|
|
158
|
+
[k in inferredOptionalOrDefaultKeyOf<o>]?: _distill<o[k], opts>;
|
|
160
159
|
}> : show<{
|
|
161
|
-
[k in keyof o as k extends
|
|
160
|
+
[k in keyof o as k extends inferredOptionalKeyOf<o> ? never : k]: _distill<o[k], opts>;
|
|
162
161
|
} & {
|
|
163
|
-
[k in keyof o as k extends
|
|
162
|
+
[k in keyof o as k extends inferredOptionalKeyOf<o> ? k : never]?: _distill<o[k], opts>;
|
|
164
163
|
}>;
|
|
165
|
-
type distillUnbrandedIo<t extends
|
|
164
|
+
type distillUnbrandedIo<t extends InferredMorph, i, o extends Out, opts extends distill.Options> = t extends (InferredMorph<constrain<infer constrainedIn, any>, Out<constrain<infer constrainedOut, any>>>) ? distillIo<constrainedIn, o extends To ? To<constrainedOut> : Out<constrainedOut>, opts> : t extends InferredMorph<constrain<infer constrainedIn, any>> ? distillIo<constrainedIn, o, opts> : t extends InferredMorph<any, Out<constrain<infer constrainedOut, any>>> ? distillIo<i, o extends To ? To<constrainedOut> : Out<constrainedOut>, opts> : distillIo<i, o, opts>;
|
|
166
165
|
type distillIo<i, o extends Out, opts extends distill.Options> = opts["endpoint"] extends "in" ? _distill<i, opts> : opts["endpoint"] extends "out.introspectable" ? o extends To<infer validatedOut> ? _distill<validatedOut, opts> : unknown : opts["endpoint"] extends "out" ? _distill<o[1], opts> : _distill<o[1], opts> extends infer r ? o extends To ? (In: i) => To<r> : (In: i) => Out<r> : never;
|
|
167
|
-
type
|
|
168
|
-
type
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
type
|
|
172
|
-
|
|
173
|
-
|
|
166
|
+
type inferredOptionalOrDefaultKeyOf<o> = inferredDefaultKeyOf<o> | inferredOptionalKeyOf<o>;
|
|
167
|
+
type inferredDefaultKeyOf<o> = keyof o extends infer k ? k extends keyof o ? [
|
|
168
|
+
o[k]
|
|
169
|
+
] extends [anyOrNever] ? never : o[k] extends InferredDefault ? k : never : never : never;
|
|
170
|
+
type inferredOptionalKeyOf<o> = keyof o extends infer k ? k extends keyof o ? [
|
|
171
|
+
o[k]
|
|
172
|
+
] extends [anyOrNever] ? never : o[k] extends InferredOptional ? k : never : never : never;
|
|
174
173
|
type distillArray<t extends array, opts extends distill.Options> = _distillArray<[...t], opts, []> extends infer result ? distillNonArraykeys<t, t extends unknown[] ? result : Readonly<t>, opts> : never;
|
|
175
174
|
type distillNonArraykeys<originalArray extends array, distilledArray, opts extends distill.Options> = keyof originalArray extends keyof distilledArray | constrained ? distilledArray : distilledArray & _distill<{
|
|
176
175
|
[k in keyof originalArray as k extends (keyof distilledArray | (opts["branded"] extends true ? never : constrained)) ? never : k]: originalArray[k];
|
|
@@ -188,11 +187,34 @@ export type inferPipes<t, pipes extends Morph[]> = pipes extends [infer head ext
|
|
|
188
187
|
export type inferMorphOut<morph extends Morph> = Exclude<ReturnType<morph>, ArkError | ArkErrors>;
|
|
189
188
|
export type Out<o = any> = ["=>", o, boolean];
|
|
190
189
|
export type To<o = any> = ["=>", o, true];
|
|
191
|
-
export type
|
|
190
|
+
export type InferredMorph<i = any, o extends Out = Out> = (In: i) => o;
|
|
192
191
|
export type Optional = {
|
|
193
192
|
optional?: {};
|
|
194
193
|
};
|
|
195
|
-
export type
|
|
194
|
+
export type InferredOptional<t = unknown> = constrain<t, Optional>;
|
|
196
195
|
export type Default<v = any> = ["=", v];
|
|
197
|
-
export type
|
|
196
|
+
export type InferredDefault<t = any, v = any> = (In?: t) => Default<v>;
|
|
198
197
|
export type termOrType<t> = t | Type<t, any>;
|
|
198
|
+
export type inferIntersection<l, r> = _inferIntersection<l, r, false>;
|
|
199
|
+
export type inferPipe<l, r> = _inferIntersection<l, r, true>;
|
|
200
|
+
type _inferIntersection<l, r, piped extends boolean> = [
|
|
201
|
+
l & r
|
|
202
|
+
] extends [infer t extends anyOrNever] ? t : l extends InferredMorph<infer lIn, infer lOut> ? r extends InferredMorph<any, infer rOut> ? piped extends true ? (In: lIn) => rOut : never : piped extends true ? (In: lIn) => To<r> : (In: _inferIntersection<lIn, r, false>) => lOut : r extends InferredMorph<infer rIn, infer rOut> ? (In: _inferIntersection<rIn, l, false>) => rOut : parseConstraints<l> extends ([
|
|
203
|
+
infer lBase,
|
|
204
|
+
infer lConstraints extends Constraints
|
|
205
|
+
]) ? parseConstraints<r> extends ([
|
|
206
|
+
infer rBase,
|
|
207
|
+
infer rConstraints extends Constraints
|
|
208
|
+
]) ? constrain<_inferIntersection<lBase, rBase, piped>, lConstraints & rConstraints> : constrain<_inferIntersection<lBase, r, piped>, lConstraints> : parseConstraints<r> extends ([
|
|
209
|
+
infer rBase,
|
|
210
|
+
infer rConstraints extends Constraints
|
|
211
|
+
]) ? constrain<_inferIntersection<l, rBase, piped>, rConstraints> : [l, r] extends [object, object] ? intersectObjects<l, r, piped> extends infer result ? result : never : l & r;
|
|
212
|
+
interface MorphableIntersection<piped extends boolean> extends Hkt<[unknown, unknown]> {
|
|
213
|
+
body: _inferIntersection<this[0], this[1], piped>;
|
|
214
|
+
}
|
|
215
|
+
type intersectObjects<l, r, piped extends boolean> = l extends array ? r extends array ? intersectArrays<l, r, MorphableIntersection<piped>> : // for an intersection with exactly one array operand like { name: string } & string[],
|
|
216
|
+
l & r : r extends array ? l & r : show<{
|
|
217
|
+
[k in keyof l]: k extends keyof r ? _inferIntersection<l[k], r[k], piped> : l[k];
|
|
218
|
+
} & {
|
|
219
|
+
[k in keyof r]: k extends keyof l ? _inferIntersection<l[k], r[k], piped> : r[k];
|
|
220
|
+
}>;
|
|
@@ -6,9 +6,9 @@ import type { BoundModule, Module } from "../module.ts";
|
|
|
6
6
|
import type { inferDefinition, validateDefinition } from "../parser/definition.ts";
|
|
7
7
|
import { type bindThis, type Scope } from "../scope.ts";
|
|
8
8
|
import type { DeclarationParser, DefinitionParser, SchemaParser, Type, TypeParser } from "../type.ts";
|
|
9
|
-
import type { distill } from "./ast.ts";
|
|
10
9
|
import { arkBuiltins } from "./builtins.ts";
|
|
11
10
|
import { arkPrototypes } from "./constructors/constructors.ts";
|
|
11
|
+
import type { distill } from "./inference.ts";
|
|
12
12
|
import { number } from "./number/number.ts";
|
|
13
13
|
import { string } from "./string/string.ts";
|
|
14
14
|
import { arkTsGenerics, arkTsKeywords, unknown } from "./ts.ts";
|
|
@@ -29,8 +29,8 @@ export declare namespace Ark {
|
|
|
29
29
|
interface boundTypeAttachments<$> extends Omit<BoundModule<typeAttachments, $>, arkKind> {
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const
|
|
32
|
+
export declare const ark: Scope<Ark>;
|
|
33
|
+
export declare const keywords: Module<Ark>;
|
|
34
34
|
export declare const type: TypeParser<{}>;
|
|
35
35
|
export declare namespace type {
|
|
36
36
|
type cast<t> = {
|
|
@@ -9,7 +9,7 @@ $arkTypeRegistry.typeAttachments = {
|
|
|
9
9
|
Key: arkBuiltins.Key,
|
|
10
10
|
Record: arkTsGenerics.Record
|
|
11
11
|
};
|
|
12
|
-
export const
|
|
12
|
+
export const ark = scope({
|
|
13
13
|
...arkTsKeywords,
|
|
14
14
|
...arkTsGenerics,
|
|
15
15
|
...arkPrototypes,
|
|
@@ -18,9 +18,9 @@ export const ambient = scope({
|
|
|
18
18
|
number,
|
|
19
19
|
unknown
|
|
20
20
|
}, { prereducedAliases: true, ambient: true });
|
|
21
|
-
export const
|
|
22
|
-
export const type =
|
|
23
|
-
export const generic =
|
|
24
|
-
export const schema =
|
|
25
|
-
export const define =
|
|
26
|
-
export const declare =
|
|
21
|
+
export const keywords = ark.export();
|
|
22
|
+
export const type = ark.type;
|
|
23
|
+
export const generic = ark.generic;
|
|
24
|
+
export const schema = ark.schema;
|
|
25
|
+
export const define = ark.define;
|
|
26
|
+
export const declare = ark.declare;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Module, Submodule } from "../../module.ts";
|
|
2
|
-
import type { Branded, constrain, constraint, Constraints, Narrowed, Optional } from "../
|
|
2
|
+
import type { Branded, constrain, constraint, Constraints, Narrowed, Optional } from "../inference.ts";
|
|
3
3
|
import { epoch } from "./epoch.ts";
|
|
4
4
|
import { integer } from "./integer.ts";
|
|
5
5
|
export declare const number: number.module;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Module, Submodule } from "../../module.ts";
|
|
2
|
-
import type { Branded, constrain, To } from "../
|
|
2
|
+
import type { Branded, constrain, To } from "../inference.ts";
|
|
3
3
|
declare namespace string {
|
|
4
4
|
type capitalized = constrain<string, Branded<"capitalized">>;
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Branded, constrain } from "../
|
|
1
|
+
import type { Branded, constrain } from "../inference.ts";
|
|
2
2
|
export declare const isLuhnValid: (creditCardInput: string) => boolean;
|
|
3
3
|
declare namespace string {
|
|
4
4
|
type creditCard = constrain<string, Branded<"creditCard">>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Module, Submodule } from "../../module.ts";
|
|
2
|
-
import type { Branded, To, constrain } from "../
|
|
2
|
+
import type { Branded, To, constrain } from "../inference.ts";
|
|
3
3
|
type DayDelimiter = "." | "/" | "-";
|
|
4
4
|
type DayPart = DayPatterns[PartKey];
|
|
5
5
|
type PartKey = keyof DayPatterns;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Module, Submodule } from "../../module.ts";
|
|
2
|
-
import type { Branded, constrain, To } from "../
|
|
2
|
+
import type { Branded, constrain, To } from "../inference.ts";
|
|
3
3
|
import type { number } from "../number/number.ts";
|
|
4
4
|
declare namespace string {
|
|
5
5
|
type integer = constrain<string, Branded<"integer">>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Module, Submodule } from "../../module.ts";
|
|
2
|
-
import type { Branded, constrain, To } from "../
|
|
2
|
+
import type { Branded, constrain, To } from "../inference.ts";
|
|
3
3
|
declare namespace string {
|
|
4
4
|
type lowercase = constrain<string, Branded<"lowercase">>;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Module, Submodule } from "../../module.ts";
|
|
2
|
-
import type { Branded, constrain, To } from "../
|
|
2
|
+
import type { Branded, constrain, To } from "../inference.ts";
|
|
3
3
|
declare namespace string {
|
|
4
4
|
type normalized = normalized.NFC;
|
|
5
5
|
namespace normalized {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Module, Submodule } from "../../module.ts";
|
|
2
|
-
import type { Branded, constrain, To } from "../
|
|
2
|
+
import type { Branded, constrain, To } from "../inference.ts";
|
|
3
3
|
declare namespace string {
|
|
4
4
|
type numeric = constrain<string, Branded<"numeric">>;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Module, Submodule } from "../../module.ts";
|
|
2
|
-
import type { AtLeastLength, AtMostLength, Branded, Constraints, ExactlyLength, LessThanLength, MoreThanLength, Narrowed, Optional, constrain, constraint } from "../
|
|
2
|
+
import type { AtLeastLength, AtMostLength, Branded, Constraints, ExactlyLength, LessThanLength, MoreThanLength, Narrowed, Optional, constrain, constraint } from "../inference.ts";
|
|
3
3
|
import { alpha } from "./alpha.ts";
|
|
4
4
|
import { alphanumeric } from "./alphanumeric.ts";
|
|
5
5
|
import { capitalize } from "./capitalize.ts";
|
|
@@ -19,6 +19,7 @@ import { upper } from "./upper.ts";
|
|
|
19
19
|
import { url } from "./url.ts";
|
|
20
20
|
import { uuid } from "./uuid.ts";
|
|
21
21
|
export declare const string: Module<{
|
|
22
|
+
root: unknown;
|
|
22
23
|
trim: Submodule<trim.submodule>;
|
|
23
24
|
normalize: Submodule<{
|
|
24
25
|
root: unknown;
|
|
@@ -39,15 +40,12 @@ export declare const string: Module<{
|
|
|
39
40
|
preformatted: unknown;
|
|
40
41
|
}>;
|
|
41
42
|
}>;
|
|
42
|
-
root: unknown;
|
|
43
|
-
date: Submodule<stringDate.submodule>;
|
|
44
|
-
lower: Submodule<lower.submodule>;
|
|
45
|
-
upper: Submodule<upper.submodule>;
|
|
46
|
-
integer: Submodule<stringInteger.submodule>;
|
|
47
|
-
json: Submodule<stringJson.submodule>;
|
|
48
43
|
alpha: unknown;
|
|
49
44
|
alphanumeric: unknown;
|
|
45
|
+
json: Submodule<stringJson.submodule>;
|
|
50
46
|
creditCard: unknown;
|
|
47
|
+
integer: Submodule<stringInteger.submodule>;
|
|
48
|
+
date: Submodule<stringDate.submodule>;
|
|
51
49
|
digits: unknown;
|
|
52
50
|
email: unknown;
|
|
53
51
|
ip: Submodule<ip.submodule>;
|
|
@@ -65,6 +63,8 @@ export declare const string: Module<{
|
|
|
65
63
|
v7: unknown;
|
|
66
64
|
v8: unknown;
|
|
67
65
|
}>;
|
|
66
|
+
upper: Submodule<upper.submodule>;
|
|
67
|
+
lower: Submodule<lower.submodule>;
|
|
68
68
|
capitalize: Submodule<capitalize.submodule>;
|
|
69
69
|
}>;
|
|
70
70
|
export type Matching<rule> = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Module, Submodule } from "../../module.ts";
|
|
2
|
-
import type { Branded, constrain, To } from "../
|
|
2
|
+
import type { Branded, constrain, To } from "../inference.ts";
|
|
3
3
|
declare namespace string {
|
|
4
4
|
type trimmed = constrain<string, Branded<"trimmed">>;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Module, Submodule } from "../../module.ts";
|
|
2
|
-
import type { Branded, constrain, To } from "../
|
|
2
|
+
import type { Branded, constrain, To } from "../inference.ts";
|
|
3
3
|
declare namespace string {
|
|
4
4
|
type uppercase = constrain<string, Branded<"uppercase">>;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Module, Submodule } from "../../module.ts";
|
|
2
|
-
import type { Branded, constrain } from "../
|
|
2
|
+
import type { Branded, constrain } from "../inference.ts";
|
|
3
3
|
export declare const uuid: Module<{
|
|
4
4
|
root: import("./string.ts").string.matching<string> | "00000000-0000-0000-0000-000000000000" | "ffffffff-ffff-ffff-ffff-ffffffffffff";
|
|
5
5
|
v4: unknown;
|
package/out/methods/array.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExactLength, ExclusiveNumericRangeSchema, exclusivizeRangeSchema, InclusiveNumericRangeSchema } from "@ark/schema";
|
|
2
|
-
import type { applyConstraintSchema } from "../keywords/
|
|
2
|
+
import type { applyConstraintSchema } from "../keywords/inference.ts";
|
|
3
3
|
import type { ObjectType } from "./object.ts";
|
|
4
4
|
interface Type<
|
|
5
5
|
/** @ts-ignore cast variance */
|
package/out/methods/base.d.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import type { ArkErrors, BaseRoot, Disjoint, JsonSchema, MetaSchema, Morph, UndeclaredKeyBehavior } from "@ark/schema";
|
|
2
2
|
import type { anyOrNever, array, Callable, ErrorMessage, inferred, Json, unset } from "@ark/util";
|
|
3
3
|
import type { ArkAmbient } from "../config.ts";
|
|
4
|
-
import type { inferIntersection } from "../
|
|
5
|
-
import type { type } from "../keywords/
|
|
6
|
-
import type { applyConstraint, Default, distill, inferMorphOut, inferPipes, Optional } from "../keywords/ast.ts";
|
|
4
|
+
import type { applyConstraint, Default, distill, inferIntersection, inferMorphOut, inferPipes, Optional } from "../keywords/inference.ts";
|
|
5
|
+
import type { type } from "../keywords/keywords.ts";
|
|
7
6
|
import type { Scope } from "../scope.ts";
|
|
8
7
|
import type { ArrayType } from "./array.ts";
|
|
9
8
|
import type { instantiateType } from "./instantiate.ts";
|
|
10
9
|
/** @ts-ignore cast variance */
|
|
11
10
|
interface Type<out t = unknown, $ = {}> extends Callable<(data: unknown) => distill.Out<t> | ArkErrors> {
|
|
12
11
|
t: t;
|
|
12
|
+
infer: this["inferOut"];
|
|
13
13
|
inferBrandableIn: distill.brandable.In<t>;
|
|
14
14
|
inferBrandableOut: distill.brandable.Out<t>;
|
|
15
15
|
inferIntrospectableOut: distill.introspectable.Out<t>;
|
|
16
|
-
|
|
16
|
+
inferOut: distill.Out<t>;
|
|
17
17
|
inferIn: distill.In<t>;
|
|
18
18
|
[inferred]: t;
|
|
19
19
|
json: Json;
|
|
20
|
+
toJSON(): Json;
|
|
20
21
|
meta: ArkAmbient.meta;
|
|
21
22
|
precompilation: string | undefined;
|
|
22
23
|
toJsonSchema(): JsonSchema;
|
|
@@ -26,30 +27,30 @@ interface Type<out t = unknown, $ = {}> extends Callable<(data: unknown) => dist
|
|
|
26
27
|
$: Scope<$>;
|
|
27
28
|
assert(data: unknown): this["infer"];
|
|
28
29
|
allows(data: unknown): data is this["inferIn"];
|
|
29
|
-
traverse(data: unknown):
|
|
30
|
+
traverse(data: unknown): this["infer"] | ArkErrors;
|
|
30
31
|
configure(meta: MetaSchema): this;
|
|
31
32
|
describe(description: string): this;
|
|
32
|
-
optional<r = applyConstraint<t, Optional>>(): instantiateType<r, $>;
|
|
33
|
-
default<value extends this["infer"], r = (In?: this["inferBrandableIn"]) => Default<value>>(value: value): instantiateType<r, $>;
|
|
34
33
|
onUndeclaredKey(behavior: UndeclaredKeyBehavior): this;
|
|
35
34
|
onDeepUndeclaredKey(behavior: UndeclaredKeyBehavior): this;
|
|
36
35
|
from(literal: this["inferIn"]): this["infer"];
|
|
37
36
|
as<t = unset>(...args: validateChainedAsArgs<t>): instantiateType<t, $>;
|
|
38
37
|
get in(): instantiateType<this["inferBrandableIn"], $>;
|
|
39
38
|
get out(): instantiateType<this["inferIntrospectableOut"], $>;
|
|
40
|
-
intersect<const def
|
|
41
|
-
and<const def
|
|
42
|
-
or<const def
|
|
39
|
+
intersect<const def>(def: type.validate<def, $>): type.infer<def, $> extends infer r ? instantiateType<inferIntersection<t, r>, $> | Disjoint : never;
|
|
40
|
+
and<const def>(def: type.validate<def, $>): type.infer<def, $> extends infer r ? instantiateType<inferIntersection<t, r>, $> : never;
|
|
41
|
+
or<const def>(def: type.validate<def, $>): type.infer<def, $> extends infer r ? instantiateType<t | r, $> : never;
|
|
43
42
|
array(): ArrayType<t[], $>;
|
|
44
43
|
pipe: ChainedPipes<t, $>;
|
|
45
44
|
equals<const def>(def: type.validate<def, $>): boolean;
|
|
46
|
-
ifEquals<const def>(def: type.validate<def, $>):
|
|
47
|
-
extends<const def>(other: type.validate<def, $>):
|
|
48
|
-
ifExtends<const def>(other: type.validate<def, $>):
|
|
45
|
+
ifEquals<const def>(def: type.validate<def, $>): type.infer<def, $> extends infer r ? instantiateType<r, $> | undefined : never;
|
|
46
|
+
extends<const def>(other: type.validate<def, $>): boolean;
|
|
47
|
+
ifExtends<const def>(other: type.validate<def, $>): type.infer<def, $> extends infer r ? instantiateType<r, $> | undefined : never;
|
|
49
48
|
overlaps<const def>(r: type.validate<def, $>): boolean;
|
|
50
|
-
extract<const def>(r: type.validate<def, $>): instantiateType<Extract<t,
|
|
51
|
-
exclude<const def>(r: type.validate<def, $>): instantiateType<Exclude<t,
|
|
52
|
-
distribute<mapOut, reduceOut = mapOut[]>(mapBranch: (branch: Type, i: number, branches: array<Type>) => mapOut, reduceMapped?: (mappedBranches: mapOut[]) => reduceOut): reduceOut
|
|
49
|
+
extract<const def>(r: type.validate<def, $>): type.infer<def, $> extends infer r ? instantiateType<Extract<t, r>, $> : never;
|
|
50
|
+
exclude<const def>(r: type.validate<def, $>): type.infer<def, $> extends infer r ? instantiateType<Exclude<t, r>, $> : never;
|
|
51
|
+
distribute<mapOut, reduceOut = mapOut[]>(mapBranch: (branch: Type, i: number, branches: array<Type>) => mapOut, reduceMapped?: (mappedBranches: mapOut[]) => reduceOut): NoInfer<reduceOut>;
|
|
52
|
+
optional<r = applyConstraint<t, Optional>>(): instantiateType<r, $>;
|
|
53
|
+
default<value extends this["infer"], r = (In?: this["inferBrandableIn"]) => Default<value>>(value: value): instantiateType<r, $>;
|
|
53
54
|
/** @deprecated */
|
|
54
55
|
apply: Function["apply"];
|
|
55
56
|
/** @deprecated */
|
|
@@ -70,13 +71,13 @@ interface Type<out t = unknown, $ = {}> extends Callable<(data: unknown) => dist
|
|
|
70
71
|
Symbol: never;
|
|
71
72
|
}
|
|
72
73
|
interface ChainedPipeSignature<t, $> {
|
|
73
|
-
<a extends Morph<distill.Out<t>>, r = instantiateType<inferPipes<t, [a]>, $>>(a: a): r
|
|
74
|
-
<a extends Morph<distill.Out<t>>, b extends Morph<inferMorphOut<a>>, r = instantiateType<inferPipes<t, [a, b]>, $>>(a: a, b: b): r
|
|
75
|
-
<a extends Morph<distill.Out<t>>, b extends Morph<inferMorphOut<a>>, c extends Morph<inferMorphOut<b>>, r = instantiateType<inferPipes<t, [a, b, c]>, $>>(a: a, b: b, c: c): r
|
|
76
|
-
<a extends Morph<distill.Out<t>>, b extends Morph<inferMorphOut<a>>, c extends Morph<inferMorphOut<b>>, d extends Morph<inferMorphOut<c>>, r = instantiateType<inferPipes<t, [a, b, c, d]>, $>>(a: a, b: b, c: c, d: d): r
|
|
77
|
-
<a extends Morph<distill.Out<t>>, b extends Morph<inferMorphOut<a>>, c extends Morph<inferMorphOut<b>>, d extends Morph<inferMorphOut<c>>, e extends Morph<inferMorphOut<d>>, r = instantiateType<inferPipes<t, [a, b, c, d, e]>, $>>(a: a, b: b, c: c, d: d, e: e): r
|
|
78
|
-
<a extends Morph<distill.Out<t>>, b extends Morph<inferMorphOut<a>>, c extends Morph<inferMorphOut<b>>, d extends Morph<inferMorphOut<c>>, e extends Morph<inferMorphOut<d>>, f extends Morph<inferMorphOut<e>>, r = instantiateType<inferPipes<t, [a, b, c, d, e, f]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f): r
|
|
79
|
-
<a extends Morph<distill.Out<t>>, b extends Morph<inferMorphOut<a>>, c extends Morph<inferMorphOut<b>>, d extends Morph<inferMorphOut<c>>, e extends Morph<inferMorphOut<d>>, f extends Morph<inferMorphOut<e>>, g extends Morph<inferMorphOut<f>>, r = instantiateType<inferPipes<t, [a, b, c, d, e, f, g]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g): r
|
|
74
|
+
<a extends Morph<distill.Out<t>>, r = instantiateType<inferPipes<t, [a]>, $>>(a: a): NoInfer<r>;
|
|
75
|
+
<a extends Morph<distill.Out<t>>, b extends Morph<inferMorphOut<a>>, r = instantiateType<inferPipes<t, [a, b]>, $>>(a: a, b: b): NoInfer<r>;
|
|
76
|
+
<a extends Morph<distill.Out<t>>, b extends Morph<inferMorphOut<a>>, c extends Morph<inferMorphOut<b>>, r = instantiateType<inferPipes<t, [a, b, c]>, $>>(a: a, b: b, c: c): NoInfer<r>;
|
|
77
|
+
<a extends Morph<distill.Out<t>>, b extends Morph<inferMorphOut<a>>, c extends Morph<inferMorphOut<b>>, d extends Morph<inferMorphOut<c>>, r = instantiateType<inferPipes<t, [a, b, c, d]>, $>>(a: a, b: b, c: c, d: d): NoInfer<r>;
|
|
78
|
+
<a extends Morph<distill.Out<t>>, b extends Morph<inferMorphOut<a>>, c extends Morph<inferMorphOut<b>>, d extends Morph<inferMorphOut<c>>, e extends Morph<inferMorphOut<d>>, r = instantiateType<inferPipes<t, [a, b, c, d, e]>, $>>(a: a, b: b, c: c, d: d, e: e): NoInfer<r>;
|
|
79
|
+
<a extends Morph<distill.Out<t>>, b extends Morph<inferMorphOut<a>>, c extends Morph<inferMorphOut<b>>, d extends Morph<inferMorphOut<c>>, e extends Morph<inferMorphOut<d>>, f extends Morph<inferMorphOut<e>>, r = instantiateType<inferPipes<t, [a, b, c, d, e, f]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f): NoInfer<r>;
|
|
80
|
+
<a extends Morph<distill.Out<t>>, b extends Morph<inferMorphOut<a>>, c extends Morph<inferMorphOut<b>>, d extends Morph<inferMorphOut<c>>, e extends Morph<inferMorphOut<d>>, f extends Morph<inferMorphOut<e>>, g extends Morph<inferMorphOut<f>>, r = instantiateType<inferPipes<t, [a, b, c, d, e, f, g]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g): NoInfer<r>;
|
|
80
81
|
}
|
|
81
82
|
export interface ChainedPipes<t, $> extends ChainedPipeSignature<t, $> {
|
|
82
83
|
try: ChainedPipeSignature<t, $>;
|
package/out/methods/date.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExclusiveDateRangeSchema, exclusivizeRangeSchema, InclusiveDateRangeSchema } from "@ark/schema";
|
|
2
|
-
import type { applyConstraintSchema } from "../keywords/
|
|
2
|
+
import type { applyConstraintSchema } from "../keywords/inference.ts";
|
|
3
3
|
import type { ObjectType } from "./object.ts";
|
|
4
4
|
/** @ts-ignore cast variance */
|
|
5
5
|
interface Type<out t extends globalThis.Date = globalThis.Date, $ = {}> extends ObjectType<t, $> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { anyOrNever, array } from "@ark/util";
|
|
2
|
-
import type {
|
|
2
|
+
import type { InferredMorph } from "../keywords/inference.ts";
|
|
3
3
|
import type { ArrayType } from "./array.ts";
|
|
4
4
|
import type { BaseType } from "./base.ts";
|
|
5
5
|
import type { DateType } from "./date.ts";
|
|
@@ -9,9 +9,9 @@ import type { ObjectType } from "./object.ts";
|
|
|
9
9
|
import type { StringType } from "./string.ts";
|
|
10
10
|
import type { ValidatorType } from "./validator.ts";
|
|
11
11
|
export type instantiateType<t, $> = [
|
|
12
|
-
Extract<t,
|
|
12
|
+
Extract<t, InferredMorph>
|
|
13
13
|
] extends [anyOrNever] ? [
|
|
14
14
|
t
|
|
15
15
|
] extends [anyOrNever] ? BaseType<t, $> : [t] extends [string] ? StringType<t, $> : [t] extends [number] ? NumberType<t, $> : [t] extends [object] ? [
|
|
16
16
|
t
|
|
17
|
-
] extends [array] ? ArrayType<t, $> : [t] extends [Date] ? DateType<t, $> : ObjectType<t, $> : ValidatorType<t, $> : MorphType<t, $>;
|
|
17
|
+
] extends [array] ? ArrayType<t, $> : [t] extends [Date] ? DateType<t, $> : ObjectType<t, $> : unknown extends t ? BaseType<unknown, $> : ValidatorType<t, $> : MorphType<t, $>;
|
package/out/methods/morph.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { Predicate, PredicateCast } from "@ark/schema";
|
|
2
|
-
import type { inferPipe } from "../
|
|
3
|
-
import type { type } from "../keywords/
|
|
4
|
-
import type { applyConstraintSchema, Out, To } from "../keywords/ast.ts";
|
|
2
|
+
import type { applyConstraintSchema, inferPipe, Out, To } from "../keywords/inference.ts";
|
|
3
|
+
import type { type } from "../keywords/keywords.ts";
|
|
5
4
|
import type { BaseType } from "./base.ts";
|
|
6
5
|
/** @ts-ignore cast variance */
|
|
7
6
|
interface Type<out t = unknown, $ = {}> extends BaseType<t, $> {
|
|
8
|
-
to<const def, r = type.infer<def, $>>(def: type.validate<def, $>): Type<inferPipe<t, r
|
|
7
|
+
to<const def, r = type.infer<def, $>>(def: type.validate<def, $>): Type<inferPipe<t, NoInfer<r>>, $>;
|
|
9
8
|
narrow<narrowed extends this["infer"] = never>(predicate: Predicate<this["infer"]> | PredicateCast<this["infer"], narrowed>): Type<([
|
|
10
9
|
narrowed
|
|
11
10
|
] extends [never] ? applyConstraintSchema<this["inferBrandableOut"], "predicate", Predicate> : narrowed) extends infer o ? this["inferIntrospectableOut"] extends this["inferBrandableOut"] ? (In: this["inferBrandableIn"]) => To<o> : (In: this["inferBrandableIn"]) => Out<o> : never, $>;
|
package/out/methods/number.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Divisor, ExclusiveNumericRangeSchema, exclusivizeRangeSchema, InclusiveNumericRangeSchema } from "@ark/schema";
|
|
2
|
-
import type { applyConstraintSchema } from "../keywords/
|
|
2
|
+
import type { applyConstraintSchema } from "../keywords/inference.ts";
|
|
3
3
|
import type { ValidatorType } from "./validator.ts";
|
|
4
4
|
/** @ts-ignore cast variance */
|
|
5
5
|
interface Type<out t extends number = number, $ = {}> extends ValidatorType<t, $> {
|