arktype 2.1.23 → 2.1.24

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/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- export { regex } from "@ark/regex";
2
1
  export { ArkError, ArkErrors, Traversal, TraversalError, type ArkSchemaConfig, type ArkSchemaScopeConfig, type JsonSchema } from "@ark/schema";
3
- export { Hkt, inferred, ParseError } from "@ark/util";
4
- export type { distill, Out } from "./attributes.ts";
2
+ export { Hkt, ParseError, inferred } from "@ark/util";
3
+ export { regex } from "arkregex";
4
+ export type { Out, distill } from "./attributes.ts";
5
5
  export * from "./config.ts";
6
6
  export { Generic } from "./generic.ts";
7
7
  export { ark, declare, define, generic, keywords, match, type, type Ark } from "./keywords/keywords.ts";
8
8
  export { Module, type BoundModule, type Submodule } from "./module.ts";
9
9
  export type { inferDefinition, validateDefinition } from "./parser/definition.ts";
10
- export { scope, type bindThis, type Scope } from "./scope.ts";
10
+ export { scope, type Scope, type bindThis } from "./scope.ts";
11
11
  export { Type } from "./type.ts";
12
12
  export type { BaseType } from "./variants/base.ts";
package/out/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { regex } from "@ark/regex";
2
1
  export { ArkError, ArkErrors, Traversal, TraversalError } from "@ark/schema";
3
- export { Hkt, inferred, ParseError } from "@ark/util";
2
+ export { Hkt, ParseError, inferred } from "@ark/util";
3
+ export { regex } from "arkregex";
4
4
  export * from "./config.js";
5
5
  export { Generic } from "./generic.js";
6
6
  export { ark, declare, define, generic, keywords, match, type } from "./keywords/keywords.js";
@@ -1,5 +1,5 @@
1
- import type { regex } from "@ark/regex";
2
1
  import { type Scanner } from "@ark/util";
2
+ import type { regex } from "arkregex";
3
3
  import type { InferredAst } from "../../ast/infer.ts";
4
4
  import type { RuntimeState } from "../../reduce/dynamic.ts";
5
5
  import type { StaticState, s } from "../../reduce/static.ts";
@@ -142,7 +142,7 @@ export interface Inferred<out t = unknown, $ = {}> {
142
142
  *
143
143
  * @throws {TraversalError}
144
144
  */
145
- assert(data: unknown): this["infer"];
145
+ assert: (data: unknown) => this["infer"];
146
146
  /**
147
147
  * #### check input without applying morphs
148
148
  *
@@ -153,7 +153,7 @@ export interface Inferred<out t = unknown, $ = {}> {
153
153
  * // [0, 2n]
154
154
  * const numerics = [0, "one", 2n].filter(Numeric.allows)
155
155
  */
156
- allows(data: unknown): data is this["inferIn"];
156
+ allows: (data: unknown) => data is this["inferIn"];
157
157
  /**
158
158
  * #### add metadata to shallow references
159
159
  *
@@ -1,5 +1,5 @@
1
- import type { regex } from "@ark/regex";
2
1
  import type { ExactLength, ExclusiveNumericRangeSchema, InclusiveNumericRangeSchema, Pattern } from "@ark/schema";
2
+ import type { regex } from "arkregex";
3
3
  import type { BaseType } from "./base.ts";
4
4
  /** @ts-ignore cast variance */
5
5
  interface Type<out t extends string = string, $ = {}> extends BaseType<t, $> {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arktype",
3
3
  "description": "TypeScript's 1:1 validator, optimized from editor to runtime",
4
- "version": "2.1.23",
4
+ "version": "2.1.24",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -28,15 +28,19 @@
28
28
  "./internal/*.ts": {
29
29
  "ark-ts": "./*.ts",
30
30
  "default": "./out/*.js"
31
+ },
32
+ "./internal/*.js": {
33
+ "ark-ts": "./*.ts",
34
+ "default": "./out/*.js"
31
35
  }
32
36
  },
33
37
  "files": [
34
38
  "out"
35
39
  ],
36
40
  "dependencies": {
37
- "@ark/util": "0.50.0",
38
- "@ark/regex": "0.0.0",
39
- "@ark/schema": "0.50.0"
41
+ "@ark/schema": "0.52.0",
42
+ "@ark/util": "0.52.0",
43
+ "arkregex": "0.0.1"
40
44
  },
41
45
  "publishConfig": {
42
46
  "access": "public"