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

@anttiviljami/dtsgenerator

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anttiviljami/dtsgenerator - npm Package Compare versions

Comparing version 3.19.1 to 3.19.2

1

dist/core/astBuilder.d.ts

@@ -23,2 +23,3 @@ import * as ts from 'typescript';

export declare function buildFreeFormObjectTypeLiteralNode(): ts.TypeNode;
export declare function buildEmptyObjectTypeLiteralNode(): ts.TypeNode;
export declare function buildUnionTypeNode<T>(types: T[], builder: (t: T, index: number) => ts.TypeNode, terminate: boolean): ts.TypeNode;

@@ -25,0 +26,0 @@ export declare function buildIntersectionTypeNode(types: readonly ts.TypeNode[], terminate: boolean): ts.TypeNode;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addOptionalInformation = exports.addComment = exports.buildTypeReferenceNode = exports.buildTupleTypeNode = exports.buildIntersectionTypeNode = exports.buildUnionTypeNode = exports.buildFreeFormObjectTypeLiteralNode = exports.buildTypeLiteralNode = exports.buildIndexSignatureNode = exports.buildPropertySignature = exports.buildTypeAliasNode = exports.buildInterfaceNode = exports.buildNamespaceNode = exports.buildBooleanLiteralTypeNode = exports.buildNumericLiteralTypeNode = exports.buildStringLiteralTypeNode = exports.buildNullKeyword = exports.buildSimpleArrayNode = exports.buildStringKeyword = exports.buildVoidKeyword = exports.buildUnknownKeyword = exports.buildNeverKeyword = exports.buildAnyKeyword = exports.buildKeyword = void 0;
exports.addOptionalInformation = exports.addComment = exports.buildTypeReferenceNode = exports.buildTupleTypeNode = exports.buildIntersectionTypeNode = exports.buildUnionTypeNode = exports.buildEmptyObjectTypeLiteralNode = exports.buildFreeFormObjectTypeLiteralNode = exports.buildTypeLiteralNode = exports.buildIndexSignatureNode = exports.buildPropertySignature = exports.buildTypeAliasNode = exports.buildInterfaceNode = exports.buildNamespaceNode = exports.buildBooleanLiteralTypeNode = exports.buildNumericLiteralTypeNode = exports.buildStringLiteralTypeNode = exports.buildNullKeyword = exports.buildSimpleArrayNode = exports.buildStringKeyword = exports.buildVoidKeyword = exports.buildUnknownKeyword = exports.buildNeverKeyword = exports.buildAnyKeyword = exports.buildKeyword = void 0;
const tslib_1 = require("tslib");

@@ -117,2 +117,8 @@ const ts = tslib_1.__importStar(require("typescript"));

exports.buildFreeFormObjectTypeLiteralNode = buildFreeFormObjectTypeLiteralNode;
function buildEmptyObjectTypeLiteralNode() {
return ts.factory.createTypeLiteralNode([
buildIndexSignatureNode('key', buildStringKeyword(), buildNeverKeyword()),
]);
}
exports.buildEmptyObjectTypeLiteralNode = buildEmptyObjectTypeLiteralNode;
function buildUnionTypeNode(types, builder, terminate) {

@@ -119,0 +125,0 @@ const node = ts.factory.createUnionTypeNode(types.map(builder));

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

}
else if (schema.content.additionalProperties === false) {
return ast.buildEmptyObjectTypeLiteralNode();
}
else {

@@ -455,0 +458,0 @@ return ast.buildFreeFormObjectTypeLiteralNode();

2

package.json
{
"name": "@anttiviljami/dtsgenerator",
"version": "3.19.1",
"version": "3.19.2",
"description": "TypeScript d.ts file generator for JSON Schema file",

@@ -5,0 +5,0 @@ "bin": {

@@ -179,2 +179,12 @@ import * as ts from 'typescript';

export function buildEmptyObjectTypeLiteralNode(): ts.TypeNode {
return ts.factory.createTypeLiteralNode([
buildIndexSignatureNode(
'key',
buildStringKeyword(),
buildNeverKeyword(),
),
]);
}
export function buildUnionTypeNode<T>(

@@ -181,0 +191,0 @@ types: T[],

@@ -704,2 +704,4 @@ import Debug from 'debug';

return ast.buildTypeLiteralNode(elements);
} else if (schema.content.additionalProperties === false) {
return ast.buildEmptyObjectTypeLiteralNode();
} else {

@@ -706,0 +708,0 @@ return ast.buildFreeFormObjectTypeLiteralNode();

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