arktype 2.0.0-dev.15 → 2.0.0-dev.17
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/type.d.ts +4 -4
- package/package.json +3 -3
package/out/type.d.ts
CHANGED
|
@@ -5,15 +5,15 @@ import type { inferDefinition, validateDeclared, validateDefinition } from "./pa
|
|
|
5
5
|
import { parseGenericParams } from "./parser/generic.js";
|
|
6
6
|
import type { IndexOneOperator, IndexZeroOperator, TupleInfixOperator } from "./parser/tuple.js";
|
|
7
7
|
import type { RawScope, Scope, bindThis } from "./scope.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export interface TypeParser<$> extends TypeParserAttachments {
|
|
8
|
+
/** The convenience properties attached to `type` */
|
|
9
|
+
export type TypeParserAttachments = Omit<TypeParser, never>;
|
|
10
|
+
export interface TypeParser<$ = {}> {
|
|
12
11
|
<const def>(def: validateTypeRoot<def, $>): Type<inferTypeRoot<def, $>, $>;
|
|
13
12
|
<const zero, const one, const rest extends array>(_0: zero extends IndexZeroOperator ? zero : validateTypeRoot<zero, $>, _1: zero extends "keyof" ? validateTypeRoot<one, $> : zero extends "instanceof" ? conform<one, Constructor> : zero extends "===" ? conform<one, unknown> : conform<one, IndexOneOperator>, ..._2: zero extends "===" ? rest : zero extends "instanceof" ? conform<rest, readonly Constructor[]> : one extends TupleInfixOperator ? one extends ":" ? [Predicate<distillIn<inferTypeRoot<zero, $>>>] : one extends "=>" ? [Morph<distillOut<inferTypeRoot<zero, $>>, unknown>] : one extends "@" ? [string | BaseMeta] : [validateTypeRoot<rest[0], $>] : []): Type<inferTypeRoot<[zero, one, ...rest], $>, $>;
|
|
14
13
|
<params extends string, const def>(params: `<${validateParameterString<params>}>`, def: validateDefinition<def, $, {
|
|
15
14
|
[param in parseGenericParams<params>[number]]: unknown;
|
|
16
15
|
}>): Generic<parseGenericParams<params>, def, $>;
|
|
16
|
+
errors: typeof ArkErrors;
|
|
17
17
|
}
|
|
18
18
|
export declare class RawTypeParser extends Callable<(...args: unknown[]) => BaseRoot | Generic, TypeParserAttachments> {
|
|
19
19
|
constructor($: RawScope);
|
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.
|
|
4
|
+
"version": "2.0.0-dev.17",
|
|
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/util": "0.0.
|
|
28
|
-
"@arktype/schema": "0.1.
|
|
27
|
+
"@arktype/util": "0.0.46",
|
|
28
|
+
"@arktype/schema": "0.1.9"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "tsx ../repo/build.ts",
|