arktype 2.0.0-rc.29 → 2.0.0-rc.30
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/keywords/ts.d.ts +1 -0
- package/out/keywords/ts.js +1 -0
- package/out/scope.d.ts +1 -1
- package/out/scope.js +3 -1
- package/out/type.js +1 -1
- package/package.json +3 -3
package/out/keywords/ts.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export declare namespace object {
|
|
|
58
58
|
}
|
|
59
59
|
declare class RecordHkt extends Hkt<[Key, unknown]> {
|
|
60
60
|
body: Record<this[0], this[1]>;
|
|
61
|
+
description: string;
|
|
61
62
|
}
|
|
62
63
|
declare const Record: import("@ark/schema").GenericRoot<readonly [["K", Key], ["V", unknown]], RecordHkt>;
|
|
63
64
|
declare class PickHkt extends Hkt<[object, Key]> {
|
package/out/keywords/ts.js
CHANGED
|
@@ -32,6 +32,7 @@ export const object = Scope.module({
|
|
|
32
32
|
json
|
|
33
33
|
});
|
|
34
34
|
class RecordHkt extends Hkt {
|
|
35
|
+
description = "a generic type that instantiates an object from a single index signature and corresponding value type";
|
|
35
36
|
}
|
|
36
37
|
const Record = genericNode(["K", intrinsic.key], "V")(args => ({
|
|
37
38
|
domain: "object",
|
package/out/scope.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ export declare class InternalScope<$ extends {} = {}> extends BaseScope<$> {
|
|
|
79
79
|
declare: () => {
|
|
80
80
|
type: InternalTypeParser;
|
|
81
81
|
};
|
|
82
|
-
define
|
|
82
|
+
define<def>(def: def): def;
|
|
83
83
|
static scope: ScopeParser;
|
|
84
84
|
static module: ModuleParser;
|
|
85
85
|
}
|
package/out/scope.js
CHANGED
|
@@ -77,7 +77,9 @@ export class InternalScope extends BaseScope {
|
|
|
77
77
|
declare = () => ({
|
|
78
78
|
type: this.type
|
|
79
79
|
});
|
|
80
|
-
define
|
|
80
|
+
define(def) {
|
|
81
|
+
return def;
|
|
82
|
+
}
|
|
81
83
|
static scope = ((def, config = {}) => new InternalScope(def, config));
|
|
82
84
|
static module = ((def, config = {}) => this.scope(def, config).export());
|
|
83
85
|
}
|
package/out/type.js
CHANGED
|
@@ -33,7 +33,7 @@ export class InternalTypeParser extends Callable {
|
|
|
33
33
|
// treat as a generic
|
|
34
34
|
const paramString = args[0].slice(1, -1);
|
|
35
35
|
const params = $.parseGenericParams(paramString, {});
|
|
36
|
-
return new GenericRoot(params, args[1], $,
|
|
36
|
+
return new GenericRoot(params, args[1], $, $, null);
|
|
37
37
|
}
|
|
38
38
|
// otherwise, treat as a tuple expression. technically, this also allows
|
|
39
39
|
// non-expression tuple definitions to be parsed, but it's not a supported
|
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-rc.
|
|
4
|
+
"version": "2.0.0-rc.30",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "David Blass",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"out"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@ark/util": "0.
|
|
38
|
-
"@ark/schema": "0.
|
|
37
|
+
"@ark/util": "0.30.0",
|
|
38
|
+
"@ark/schema": "0.30.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|