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

typescript-json-schema

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-json-schema - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

2

package.json
{
"name": "typescript-json-schema",
"version": "0.0.7",
"version": "0.0.8",
"description": "typescript-json-schema generates JSON Schema files from your Typescript sources",

@@ -5,0 +5,0 @@ "main": "typescript-json-schema.js",

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

interface MyObject {
export interface MyObject {
propA: number;
propB: number;
}

@@ -352,2 +352,3 @@ "use strict";

var fullName_1 = tc.getFullyQualifiedName(node.symbol);
fullName_1 = fullName_1.replace(/".*"\./, "");
allSymbols_1[fullName_1] = nodeType;

@@ -435,3 +436,3 @@ var baseTypes = nodeType.getBaseTypes() || [];

usePropertyOrder: args.propOrder,
generateRequired: args.generateRequired
generateRequired: args.required
});

@@ -438,0 +439,0 @@ }

@@ -418,3 +418,11 @@ import * as ts from "typescript";

const nodeType = tc.getTypeAtLocation(node);
const fullName = tc.getFullyQualifiedName((<any>node).symbol)
let fullName = tc.getFullyQualifiedName((<any>node).symbol)
// remove file name
// TODO: we probably don't want this eventually,
// as same types can occur in different files and will override eachother in allSymbols
// This means atm we can't generate all types in large programs.
fullName = fullName.replace(/".*"\./, "");
allSymbols[fullName] = nodeType;

@@ -507,3 +515,3 @@

usePropertyOrder: args.propOrder,
generateRequired: args.generateRequired
generateRequired: args.required
});

@@ -518,3 +526,3 @@ }

//TJS.exec("example/**/*.ts", "Invoice");
//const result = TJS.generateSchema(TJS.getProgramFromFiles(["test/programs/array-types/main.ts"]), "MyArray");
//const result = TJS.generateSchema(TJS.getProgramFromFiles(["test/programs/interface-single/main.ts"]), "MyObject");
//console.log(JSON.stringify(result));

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