Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ark/schema

Package Overview
Dependencies
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ark/schema - npm Package Compare versions

Comparing version 0.29.0 to 0.30.0

4

out/generic.d.ts

@@ -41,3 +41,5 @@ import { Callable, type array, type Hkt, type JsonStructure } from "@ark/util";

baseInstantiation: BaseRoot;
constructor(paramDefs: array<GenericParamDef>, bodyDef: bodyDef, $: BaseScope, arg$: BaseScope);
hkt: Hkt.constructor | null;
description: string;
constructor(paramDefs: array<GenericParamDef>, bodyDef: bodyDef, $: BaseScope, arg$: BaseScope, hkt: Hkt.constructor | null);
defIsLazy(): this is GenericRoot<params, LazyGenericBody>;

@@ -44,0 +46,0 @@ protected cacheGetter<name extends keyof this>(name: name, value: this[name]): this[name];

import { Callable, flatMorph, snapshot, throwParseError } from "@ark/util";
import { $ark } from "./shared/registry.js";
import { arkKind } from "./shared/utils.js";
export const parseGeneric = (paramDefs, bodyDef, $) => new GenericRoot(paramDefs, bodyDef, $, $);
export const parseGeneric = (paramDefs, bodyDef, $) => new GenericRoot(paramDefs, bodyDef, $, $, null);
export class LazyGenericBody extends Callable {

@@ -14,3 +14,5 @@ }

baseInstantiation;
constructor(paramDefs, bodyDef, $, arg$) {
hkt;
description;
constructor(paramDefs, bodyDef, $, arg$, hkt) {
super((...args) => {

@@ -34,2 +36,7 @@ const argNodes = flatMorph(this.names, (i, name) => {

this.arg$ = arg$;
this.hkt = hkt;
this.description =
hkt ?
(new hkt().description ?? `a generic type for ${hkt.constructor.name}`)
: "a generic type";
this.baseInstantiation = this(...this.constraints);

@@ -36,0 +43,0 @@ }

@@ -91,3 +91,3 @@ import { ParseError, flatMorph, hasDomain, isArray, isThunk, printable, throwInternalError, throwParseError } from "@ark/util";

const $ = this;
return (def, possibleHkt) => new GenericRoot(params, possibleHkt ? new LazyGenericBody(def) : def, $, $);
return (def, possibleHkt) => new GenericRoot(params, possibleHkt ? new LazyGenericBody(def) : def, $, $, possibleHkt ?? null);
};

@@ -157,3 +157,3 @@ units = (values, opts) => {

new reference.constructor(reference.attachments, this)
: new GenericRoot(reference.params, reference.bodyDef, reference.$, this);
: new GenericRoot(reference.params, reference.bodyDef, reference.$, this, reference.hkt);
if (!this.resolved) {

@@ -160,0 +160,0 @@ // we're still parsing the scope itself, so defer compilation but

{
"name": "@ark/schema",
"version": "0.29.0",
"version": "0.30.0",
"license": "MIT",

@@ -32,3 +32,3 @@ "author": {

"dependencies": {
"@ark/util": "0.29.0"
"@ark/util": "0.30.0"
},

@@ -35,0 +35,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