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

typescript-json-schema

Package Overview
Dependencies
Maintainers
2
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.54.0 to 0.55.0

37

api.md

@@ -1260,2 +1260,25 @@ _Auto-generated file. Updated with NPM deploy. Update manually with 'yarn docs'._

## [prop-override](./test/programs/prop-override)
```ts
import type { ObjectId } from './third-party'
export type MyObject = {
/**
* @TJS-type string
* @description Overrides aliased type definition with this JSDoc if at least TJS-type annotation is present
*/
_id: ObjectId
}
```
## [prop-override](./test/programs/prop-override)
```ts
// cannot modify with JSDoc because third-party sources
export class ObjectId {}
```
## [strict-null-checks](./test/programs/strict-null-checks)

@@ -1334,2 +1357,16 @@

## [type-alias-or](./test/programs/type-alias-or)
```ts
interface A {}
interface B {}
type C = A | B;
interface MyObject {
c: C;
}
```
## [type-alias-schema-override](./test/programs/type-alias-schema-override)

@@ -1336,0 +1373,0 @@

9

dist/typescript-json-schema.js

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

}
else if (flags & ts.TypeFlags.ESSymbol) {
definition.type = "symbol";
}
else if (flags & ts.TypeFlags.Null) {

@@ -887,2 +890,3 @@ definition.type = "null";

JsonSchemaGenerator.prototype.getTypeDefinition = function (typ, asRef, unionModifier, prop, reffedType, pairedSymbol) {
var _a;
if (asRef === void 0) { asRef = this.args.ref; }

@@ -909,3 +913,3 @@ if (unionModifier === void 0) { unionModifier = "anyOf"; }

this.parseCommentsIntoDefinition(prop, defs, others);
if (defs.hasOwnProperty("ignore")) {
if (defs.hasOwnProperty("ignore") || defs.hasOwnProperty("type")) {
return defs;

@@ -920,2 +924,5 @@ }

this.tc.getIndexInfoOfType(typ, ts.IndexKind.Number) !== undefined));
if (isRawType && ((_a = typ.aliasSymbol) === null || _a === void 0 ? void 0 : _a.escapedName) && typ.types) {
isRawType = false;
}
var isStringEnum = false;

@@ -922,0 +929,0 @@ if (typ.flags & ts.TypeFlags.Union) {

6

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

@@ -49,4 +49,4 @@ "main": "dist/typescript-json-schema.js",

"safe-stable-stringify": "^2.2.0",
"ts-node": "^10.2.1",
"typescript": "~4.6.0",
"ts-node": "^10.9.1",
"typescript": "~4.8.2",
"yargs": "^17.1.1"

@@ -53,0 +53,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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