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

tson-schema

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tson-schema - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

10

dist/object.d.ts

@@ -11,2 +11,10 @@ import { BaseSchemaDefinition, TypedSchema } from './common';

}>;
export { objectType as object };
interface RecordSchemaDefinition<T> extends BaseSchemaDefinition {
additionalProperties: TypedSchema<T>;
}
interface AnyRecordSchemaDefinition extends BaseSchemaDefinition {
additionalProperties: true;
}
declare function recordType(schema: AnyRecordSchemaDefinition): TypedSchema<Record<string, any>>;
declare function recordType<T>(schema: RecordSchemaDefinition<T>): TypedSchema<Record<string, T>>;
export { objectType as object, recordType as record };
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -25,2 +36,12 @@ function objectType(schema) {

exports.object = objectType;
function recordType(schema) {
return {
getSchema: function () { return (__assign(__assign({}, schema), { additionalProperties: schema.additionalProperties === true
? true
: schema.additionalProperties.getSchema(), type: 'object' })); },
// tslint:disable-next-line:no-object-literal-type-assertion
type: {},
};
}
exports.record = recordType;
//# sourceMappingURL=object.js.map

2

package.json
{
"name": "tson-schema",
"version": "0.6.0",
"version": "0.7.0",
"description": "A TypeScript API to create JSON-Schemas and TypeScript types",

@@ -5,0 +5,0 @@ "files": [

Sorry, the diff of this file is not supported yet

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