Socket
Socket
Sign inDemoInstall

arktype

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arktype - npm Package Compare versions

Comparing version 2.0.0-rc.10 to 2.0.0-rc.11

3

out/keywords/inference.d.ts

@@ -176,3 +176,4 @@ import type { ArkError, ArkErrors, Constraint, constraintKindOf, Morph, NodeSchema } from "@ark/schema";

] extends [anyOrNever] ? never : o[k] extends InferredOptional ? k : never : never : never;
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;
type distillArray<t extends array, opts extends distill.Options> = t[number][] extends t ? alignReadonly<_distill<t[number], opts>[], t> : distillNonArraykeys<t, alignReadonly<_distillArray<[...t], opts, []>, t>, opts>;
type alignReadonly<result extends unknown[], original extends array> = original extends unknown[] ? result : Readonly<result>;
type distillNonArraykeys<originalArray extends array, distilledArray, opts extends distill.Options> = keyof originalArray extends keyof distilledArray | constrained ? distilledArray : distilledArray & _distill<{

@@ -179,0 +180,0 @@ [k in keyof originalArray as k extends (keyof distilledArray | (opts["branded"] extends true ? never : constrained)) ? never : k]: originalArray[k];

@@ -14,3 +14,3 @@ import type { ArkErrors, arkKind } from "@ark/schema";

import { string } from "./string/string.ts";
import { arkTsGenerics, arkTsKeywords, unknown } from "./ts.ts";
import { arkTsGenerics, arkTsKeywords, object, unknown } from "./ts.ts";
export interface Ark extends Omit<Ark.keywords, keyof Ark.wrapped>, Ark.wrapped {

@@ -24,2 +24,3 @@ }

number: number.submodule;
object: object.submodule;
unknown: unknown.submodule;

@@ -26,0 +27,0 @@ }

@@ -6,3 +6,3 @@ import { $arkTypeRegistry, scope } from "../scope.js";

import { string } from "./string/string.js";
import { arkTsGenerics, arkTsKeywords, unknown } from "./ts.js";
import { arkTsGenerics, arkTsKeywords, object, unknown } from "./ts.js";
$arkTypeRegistry.typeAttachments = {

@@ -20,2 +20,3 @@ ...arkTsKeywords,

number,
object,
unknown

@@ -22,0 +23,0 @@ }, { prereducedAliases: true, ambient: true });

@@ -1,3 +0,4 @@

import { Hkt, type Key, type omit, type pick, type show } from "@ark/util";
import { Hkt, type Json, type Key, type omit, type pick, type show } from "@ark/util";
import type { Module, Submodule } from "../module.ts";
import type { To } from "./inference.ts";
export declare const arkTsKeywords: arkTsKeywords;

@@ -33,2 +34,27 @@ export type arkTsKeywords = Module<arkTsKeywords.$>;

}
export declare const json: Module<{
root: unknown;
stringify: unknown;
}>;
export declare namespace json {
type submodule = Submodule<$>;
type $ = {
root: Json;
stringify: (In: Json) => To<string>;
};
}
export declare const object: Module<{
root: unknown;
json: Submodule<{
root: unknown;
stringify: unknown;
}>;
}>;
export declare namespace object {
type submodule = Submodule<$>;
type $ = {
root: object;
json: json.submodule;
};
}
declare class RecordHkt extends Hkt<[Key, unknown]> {

@@ -35,0 +61,0 @@ body: Record<this[0], this[1]>;

@@ -1,2 +0,2 @@

import { genericNode, intrinsic } from "@ark/schema";
import { genericNode, intrinsic, node } from "@ark/schema";
import { Hkt } from "@ark/util";

@@ -22,2 +22,14 @@ import { arkModule } from "./utils.js";

});
export const json = arkModule({
root: intrinsic.json,
stringify: node("morph", {
in: intrinsic.json,
morphs: (data) => JSON.stringify(data),
declaredOut: intrinsic.string
})
});
export const object = arkModule({
root: intrinsic.object,
json
});
class RecordHkt extends Hkt {

@@ -24,0 +36,0 @@ }

{
"name": "arktype",
"description": "TypeScript's 1:1 validator, optimized from editor to runtime",
"version": "2.0.0-rc.10",
"version": "2.0.0-rc.11",
"license": "MIT",

@@ -37,4 +37,4 @@ "author": {

"dependencies": {
"@ark/util": "0.12.0",
"@ark/schema": "0.12.0"
"@ark/util": "0.13.0",
"@ark/schema": "0.13.0"
},

@@ -41,0 +41,0 @@ "publishConfig": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc