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

ts-json-schema-generator

Package Overview
Dependencies
Maintainers
1
Versions
337
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-json-schema-generator - npm Package Compare versions

Comparing version 0.15.0 to 0.16.0

7

dist/src/TypeFormatter/TupleTypeFormatter.js

@@ -14,8 +14,3 @@ "use strict";

.map((item) => this.childTypeFormatter.getDefinition(item));
return {
type: "array",
items: tupleDefinitions,
minItems: tupleDefinitions.length,
additionalItems: { anyOf: tupleDefinitions },
};
return Object.assign({ type: "array", items: tupleDefinitions, minItems: tupleDefinitions.length }, (tupleDefinitions.length > 1 ? { additionalItems: { anyOf: tupleDefinitions } } : {}));
}

@@ -22,0 +17,0 @@ getChildren(type) {

7

dist/src/TypeFormatter/UnionTypeFormatter.js

@@ -12,5 +12,6 @@ "use strict";

getDefinition(type) {
return {
anyOf: type.getTypes().map((item) => this.childTypeFormatter.getDefinition(item)),
};
const definitions = type.getTypes().map((item) => this.childTypeFormatter.getDefinition(item));
return definitions.length > 1 ? {
anyOf: definitions,
} : definitions[0];
}

@@ -17,0 +18,0 @@ getChildren(type) {

{
"name": "ts-json-schema-generator",
"version": "0.15.0",
"version": "0.16.0",
"description": "Generate JSON schema from your Typescript sources",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,9 +0,8 @@

namespace A {
export interface CC {
c: number;
}
/** @hide */
export type Hidden = number;
export interface C extends CC {}
export interface A {
foo: number;
}
export interface MyObject extends A.C {}
export type MyObject = A | Hidden;

Sorry, the diff of this file is not supported yet

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