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
335
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.18.0 to 0.19.0

2

dist/factory/parser.js

@@ -47,3 +47,3 @@ "use strict";

if (config.jsDoc === "extended") {
return new AnnotatedNodeParser_1.AnnotatedNodeParser(nodeParser, new ExtendedAnnotationsReader_1.ExtendedAnnotationsReader());
return new AnnotatedNodeParser_1.AnnotatedNodeParser(nodeParser, new ExtendedAnnotationsReader_1.ExtendedAnnotationsReader(typeChecker));
}

@@ -50,0 +50,0 @@ else if (config.jsDoc === "basic") {

@@ -5,2 +5,4 @@ import * as ts from "typescript";

export declare class ExtendedAnnotationsReader extends BasicAnnotationsReader {
private typeChecker;
constructor(typeChecker: ts.TypeChecker);
getAnnotations(node: ts.Node): Annotations | undefined;

@@ -7,0 +9,0 @@ isNullable(node: ts.Node): boolean;

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

class ExtendedAnnotationsReader extends BasicAnnotationsReader_1.BasicAnnotationsReader {
constructor(typeChecker) {
super();
this.typeChecker = typeChecker;
}
getAnnotations(node) {

@@ -27,3 +31,3 @@ const annotations = Object.assign({}, this.getDescriptionAnnotation(node), this.getTypeAnnotation(node), super.getAnnotations(node));

}
const comments = symbol.getDocumentationComment();
const comments = symbol.getDocumentationComment(this.typeChecker);
if (!comments || !comments.length) {

@@ -30,0 +34,0 @@ return undefined;

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

@@ -41,20 +41,20 @@ "main": "dist/index.js",

"dependencies": {
"commander": "~2.12.2",
"commander": "~2.13.0",
"glob": "~7.1.2",
"json-stable-stringify": "^1.0.1",
"ts-node": "^4.1.0",
"typescript": "~2.6.2"
"typescript": "~2.7.1"
},
"devDependencies": {
"@types/assertion-error": "^1.0.30",
"@types/chai": "^4.0.10",
"@types/glob": "^5.0.34",
"@types/assertion-error": "^1.1.0",
"@types/chai": "^4.1.2",
"@types/glob": "^5.0.35",
"@types/json-stable-stringify": "^1.0.32",
"@types/mocha": "^2.2.45",
"@types/node": "^8.5.2",
"ajv": "~5.5.2",
"@types/mocha": "^2.2.48",
"@types/node": "^9.4.0",
"ajv": "~6.1.1",
"chai": "~4.1.2",
"mocha": "~4.1.0",
"source-map-support": "~0.5.0",
"tslint": "~5.8.0"
"mocha": "~5.0.0",
"source-map-support": "~0.5.3",
"tslint": "~5.9.1"
},

@@ -61,0 +61,0 @@ "scripts": {

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

export interface MyObject {
foo: "ok" | "fail" | "abort";
bar: "ok" | "fail" | "abort" | string;
}
export type MyObject = Readonly<{ test: string }>;

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 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