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

@effect/schema

Package Overview
Dependencies
Maintainers
3
Versions
335
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effect/schema - npm Package Compare versions

Comparing version 0.0.0-snapshot-27f0443ffcce4f230f5d485826d1b79976d1307e to 0.0.0-snapshot-28c950c1f2b091132e985b78bbb8d0f72c86ce2f

4

dist/dts/AST.d.ts

@@ -1126,2 +1126,6 @@ /**

export declare const encodedAST: (ast: AST) => AST;
/**
* @since 1.0.0
*/
export declare const encodedBoundAST: (ast: AST) => AST;
//# sourceMappingURL=AST.d.ts.map

36

dist/esm/AST.js

@@ -1963,10 +1963,7 @@ /**

}
/**
* @since 1.0.0
*/
export const encodedAST = ast => {
const encodedAST_ = (ast, bound) => {
switch (ast._tag) {
case "Declaration":
{
const typeParameters = changeMap(ast.typeParameters, encodedAST);
const typeParameters = changeMap(ast.typeParameters, ast => encodedAST_(ast, bound));
return typeParameters === ast.typeParameters ? ast : new Declaration(typeParameters, ast.decodeUnknown, ast.encodeUnknown, ast.annotations);

@@ -1977,6 +1974,6 @@ }

const elements = changeMap(ast.elements, e => {
const type = encodedAST(e.type);
const type = encodedAST_(e.type, bound);
return type === e.type ? e : new Element(type, e.isOptional);
});
const rest = changeMap(ast.rest, encodedAST);
const rest = changeMap(ast.rest, ast => encodedAST_(ast, bound));
return elements === ast.elements && rest === ast.rest ? ast : new TupleType(elements, rest, ast.isReadonly, createJSONIdentifierAnnotation(ast));

@@ -1987,7 +1984,7 @@ }

const propertySignatures = changeMap(ast.propertySignatures, ps => {
const type = encodedAST(ps.type);
const type = encodedAST_(ps.type, bound);
return type === ps.type ? ps : new PropertySignature(ps.name, type, ps.isOptional, ps.isReadonly);
});
const indexSignatures = changeMap(ast.indexSignatures, is => {
const type = encodedAST(is.type);
const type = encodedAST_(is.type, bound);
return type === is.type ? is : new IndexSignature(is.parameter, type, is.isReadonly);

@@ -1999,13 +1996,28 @@ });

{
const types = changeMap(ast.types, encodedAST);
const types = changeMap(ast.types, ast => encodedAST_(ast, bound));
return types === ast.types ? ast : Union.make(types, createJSONIdentifierAnnotation(ast));
}
case "Suspend":
return new Suspend(() => encodedAST(ast.f()), createJSONIdentifierAnnotation(ast));
return new Suspend(() => encodedAST_(ast.f(), bound), createJSONIdentifierAnnotation(ast));
case "Refinement":
{
const from = encodedAST_(ast.from, bound);
if (bound) {
return from === ast.from ? ast : from;
}
return from;
}
case "Transformation":
return encodedAST(ast.from);
return encodedAST_(ast.from, bound);
}
return ast;
};
/**
* @since 1.0.0
*/
export const encodedAST = ast => encodedAST_(ast, false);
/**
* @since 1.0.0
*/
export const encodedBoundAST = ast => encodedAST_(ast, true);
const toJSONAnnotations = annotations => {

@@ -2012,0 +2024,0 @@ const out = {};

{
"name": "@effect/schema",
"version": "0.0.0-snapshot-27f0443ffcce4f230f5d485826d1b79976d1307e",
"version": "0.0.0-snapshot-28c950c1f2b091132e985b78bbb8d0f72c86ce2f",
"description": "Modeling the schema of data structures as first-class values",

@@ -16,3 +16,3 @@ "license": "MIT",

"peerDependencies": {
"effect": "^0.0.0-snapshot-27f0443ffcce4f230f5d485826d1b79976d1307e"
"effect": "^0.0.0-snapshot-28c950c1f2b091132e985b78bbb8d0f72c86ce2f"
},

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

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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