arktype 2.0.0-dev.19 → 2.0.0-dev.20

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/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { ArkError, ArkErrors } from "@arktype/schema";
1
+ export { ArkError, ArkErrors as ArkErrors } from "@arktype/schema";
2
2
  export type { Ark, ArkConfig, Out } from "@arktype/schema";
3
3
  export { ambient, ark, declare, define, match, type } from "./ark.js";
4
4
  export { Module } from "./module.js";
package/out/api.js CHANGED
@@ -1,4 +1,4 @@
1
- export { ArkError, ArkErrors } from "@arktype/schema";
1
+ export { ArkError, ArkErrors as ArkErrors } from "@arktype/schema";
2
2
  export { ambient, ark, declare, define, match, type } from "./ark.js";
3
3
  export { Module } from "./module.js";
4
4
  export { scope } from "./scope.js";
@@ -1,4 +1,4 @@
1
- import type { BaseRoot } from "@arktype/schema";
1
+ import type { BaseRoot, resolvableReferenceIn } from "@arktype/schema";
2
2
  import { type ErrorMessage } from "@arktype/util";
3
3
  import type { inferAstRoot } from "../semantic/infer.js";
4
4
  import type { DynamicState, DynamicStateWithRoot } from "./reduce/dynamic.js";
@@ -15,7 +15,7 @@ export type parseString<def extends string, $, args> = def extends keyof $ ? def
15
15
  "[]"
16
16
  ] : fullStringParse<state.initialize<def>, $, args> : fullStringParse<state.initialize<def>, $, args>;
17
17
  export type inferString<def extends string, $, args> = inferAstRoot<parseString<def, $, args>, $, args>;
18
- export type BaseCompletions<$, args, otherSuggestions extends string = never> = (keyof $ & string) | (keyof args & string) | StringifiablePrefixOperator | otherSuggestions;
18
+ export type BaseCompletions<$, args, otherSuggestions extends string = never> = resolvableReferenceIn<$> | (keyof args & string) | StringifiablePrefixOperator | otherSuggestions;
19
19
  export declare const fullStringParse: (s: DynamicState) => BaseRoot;
20
20
  type fullStringParse<s extends StaticState, $, args> = extractFinalizedResult<parseUntilFinalizer<s, $, args>>;
21
21
  export declare const parseUntilFinalizer: (s: DynamicState) => DynamicStateWithRoot;
package/out/type.d.ts CHANGED
@@ -45,6 +45,7 @@ declare class _Type<t = unknown, $ = any> extends InnerRoot<t, $> {
45
45
  extract<def>(r: validateTypeRoot<def, $>): Type<t, $>;
46
46
  exclude<def>(r: validateTypeRoot<def, $>): Type<t, $>;
47
47
  extends<def>(other: validateTypeRoot<def, $>): this is Type<inferTypeRoot<def>, $>;
48
+ overlaps<def>(r: validateTypeRoot<def, $>): boolean;
48
49
  constrain<kind extends PrimitiveConstraintKind, const def extends NodeSchema<kind>>(kind: conform<kind, constraintKindOf<this["inferIn"]>>, def: def): Type<constrain<t, kind, def>, $>;
49
50
  satisfying<predicate extends Predicate<distillIn<t>>>(predicate: predicate): Type<t extends MorphAst ? (In: inferPredicate<this["tIn"], predicate>) => Out<this["tOut"]> : inferPredicate<t, predicate>, $>;
50
51
  divisibleBy<const schema extends DivisorSchema>(this: validateChainedConstraint<"divisor", this>, schema: schema): Type<constrain<t, "divisor", schema>, $>;
@@ -65,9 +66,9 @@ declare class _Type<t = unknown, $ = any> extends InnerRoot<t, $> {
65
66
  }
66
67
  export interface Type<
67
68
  /** @ts-expect-error allow instantiation assignment to the base type */
68
- out t = unknown, $ = any> extends _Type<t, $> {
69
+ out t = unknown, $ = {}> extends _Type<t, $> {
69
70
  }
70
- export type TypeConstructor<t = unknown, $ = any> = new (def: unknown, $: Scope<$>) => Type<t, $>;
71
+ export type TypeConstructor<t = unknown, $ = {}> = new (def: unknown, $: Scope<$>) => Type<t, $>;
71
72
  export declare const Type: TypeConstructor;
72
73
  export type DefinitionParser<$> = <def>(def: validateTypeRoot<def, $>) => def;
73
74
  export type validateTypeRoot<def, $ = {}> = validateDefinition<def, $ & ambient, bindThis<def>>;
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.0.0-dev.19",
4
+ "version": "2.0.0-dev.20",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "David Blass",
@@ -24,8 +24,8 @@
24
24
  "out"
25
25
  ],
26
26
  "dependencies": {
27
- "@arktype/schema": "0.1.11",
28
- "@arktype/util": "0.0.47"
27
+ "@arktype/util": "0.0.48",
28
+ "@arktype/schema": "0.1.12"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "tsx ../repo/build.ts",