ts-json-schema-generator
Advanced tools
Comparing version 0.18.0 to 0.19.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
246978
3498
+ Addedcommander@2.13.0(transitive)
+ Addedtypescript@2.7.2(transitive)
- Removedcommander@2.12.2(transitive)
- Removedtypescript@2.6.2(transitive)
Updatedcommander@~2.13.0
Updatedtypescript@~2.7.1