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 2.0.7 to 2.5.0

.github/workflows/ci.yml

22

CHANGELOG.md

@@ -5,2 +5,24 @@ # ChangeLog

### [v1.2.0](https://github.com/horiuchi/dtsgenerator/releases/tag/v1.2.0) (2018-09-12)
- features
- Add `--namespace <namespace>` option to control the emitted namespace. Thank you @DavidBiesack :+1:
### [v1.1.0](https://github.com/horiuchi/dtsgenerator/releases/tag/v1.1.0) (2018-06-01)
- features
- Add [the supported features document](https://github.com/horiuchi/dtsgenerator/blob/master/SupportedFeatures.md)
- Support some properties
- `title`, `const`, `readOnly`
### [v1.0.0](https://github.com/horiuchi/dtsgenerator/releases/tag/v1.0.0) (2018-03-22)
- features
- Support JSON Schema Draft-07 and OpenAPI v3
- Add the library interface for customize type name
- Remove some unusual command line options
- And rebuild the architecture
- others
- Remove the node v4 support
### [v0.9.9](https://github.com/horiuchi/dtsgenerator/releases/tag/v0.9.9) (2018-01-12)

@@ -7,0 +29,0 @@

17

dist/cli.js

@@ -62,3 +62,4 @@ "use strict";

return tslib_1.__awaiter(this, void 0, void 0, function () {
var e_1, _a, contents, _b, _c, _d, _e, pattern, cs, e_1_1;
var contents, _a, _b, _c, _d, pattern, cs, e_1_1;
var e_1, _e;
return tslib_1.__generator(this, function (_f) {

@@ -70,14 +71,14 @@ switch (_f.label) {

if (!commandOptions_1.default.isReadFromStdin()) return [3, 2];
_c = (_b = contents).push;
_b = (_a = contents).push;
return [4, readSchemaFromStdin()];
case 1:
_c.apply(_b, [_f.sent()]);
_b.apply(_a, [_f.sent()]);
_f.label = 2;
case 2:
_f.trys.push([2, 7, 8, 9]);
_d = tslib_1.__values(commandOptions_1.default.files), _e = _d.next();
_c = tslib_1.__values(commandOptions_1.default.files), _d = _c.next();
_f.label = 3;
case 3:
if (!!_e.done) return [3, 6];
pattern = _e.value;
if (!!_d.done) return [3, 6];
pattern = _d.value;
return [4, readSchemasFromFile(pattern)];

@@ -89,3 +90,3 @@ case 4:

case 5:
_e = _d.next();
_d = _c.next();
return [3, 3];

@@ -99,3 +100,3 @@ case 6: return [3, 9];

try {
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
if (_d && !_d.done && (_e = _c.return)) _e.call(_c);
}

@@ -102,0 +103,0 @@ finally { if (e_1) throw e_1.error; }

@@ -13,3 +13,3 @@ import ReferenceResolver from './referenceResolver';

private generateDeclareType;
private generateTypeModel;
private generateAnyTypeModel;
private generateTypeCollection;

@@ -16,0 +16,0 @@ private generateProperties;

@@ -68,7 +68,7 @@ "use strict";

switch (type) {
case 'object':
case 'any':
return this.generateTypeModel(normalized);
return this.generateAnyTypeModel(normalized);
case 'array':
return this.generateTypeCollection(normalized);
case 'object':
default:

@@ -134,11 +134,16 @@ return this.generateDeclareType(normalized);

DtsGenerator.prototype.generateDeclareType = function (schema) {
this.convertor.outputExportType(schema.id);
this.generateTypeProperty(schema, true);
var content = schema.content;
if (content.$ref || content.oneOf || content.anyOf || content.enum || 'const' in content || content.type !== 'object') {
this.convertor.outputExportType(schema.id);
this.generateTypeProperty(schema, true);
}
else {
this.convertor.startInterfaceNest(schema.id);
this.generateProperties(schema);
this.convertor.endInterfaceNest();
}
};
DtsGenerator.prototype.generateTypeModel = function (schema) {
DtsGenerator.prototype.generateAnyTypeModel = function (schema) {
this.convertor.startInterfaceNest(schema.id);
if (schema.content.type === 'any') {
this.convertor.outputRawValue('[name: string]: any; // any', true);
}
this.generateProperties(schema);
this.convertor.outputRawValue('[name: string]: any; // any', true);
this.convertor.endInterfaceNest();

@@ -202,3 +207,3 @@ };

this.convertor.outputArrayedType(schema, content.enum, function (value) {
if (content.type === 'integer') {
if (content.type === 'integer' || content.type === 'number') {
_this.convertor.outputRawValue('' + value);

@@ -213,3 +218,3 @@ }

var value = content.const;
if (content.type === 'integer') {
if (content.type === 'integer' || content.type === 'number') {
this.convertor.outputStringTypeName(schema, '' + value, terminate);

@@ -243,2 +248,3 @@ }

var minItems = schema.content.minItems;
var maxItems = schema.content.maxItems;
if (items == null) {

@@ -251,36 +257,41 @@ this.convertor.outputStringTypeName(schema, 'any[]', terminate);

}
else if (items.length === 0 && minItems === undefined) {
else if (items.length === 0 && minItems === undefined && maxItems === undefined) {
this.convertor.outputStringTypeName(schema, 'any[]', terminate);
}
else if (minItems != null && maxItems != null && maxItems < minItems) {
this.convertor.outputStringTypeName(schema, 'never', terminate);
}
else {
var effectiveMaxItems = 1 + Math.max(minItems || 0, items.length);
for (var unionIndex = minItems === undefined ? 1 : minItems; unionIndex <= effectiveMaxItems; unionIndex++) {
this.convertor.outputRawValue('[');
for (var i = 0; i < unionIndex; i++) {
if (i > 0) {
this.convertor.outputRawValue(', ');
this.convertor.outputRawValue('[');
var itemCount = Math.max(minItems || 0, maxItems || 0, items.length);
if (maxItems != null) {
itemCount = Math.min(itemCount, maxItems);
}
for (var i = 0; i < itemCount; i++) {
if (i > 0) {
this.convertor.outputRawValue(', ');
}
if (i < items.length) {
var type = this.normalizeContent(schema, '/items/' + i);
if (type.id.isEmpty()) {
this.generateTypeProperty(type, false);
}
if (i < items.length) {
var type = this.normalizeContent(schema, '/items/' + i);
if (type.id.isEmpty()) {
this.generateTypeProperty(type, false);
}
else {
this.convertor.outputTypeIdName(type, this.currentSchema, false);
}
}
else {
if (i < effectiveMaxItems - 1) {
this.convertor.outputStringTypeName(schema, 'Object', false, false);
}
else {
this.convertor.outputStringTypeName(schema, 'any', false, false);
}
this.convertor.outputTypeIdName(type, this.currentSchema, false);
}
}
this.convertor.outputRawValue(']');
if (unionIndex < effectiveMaxItems) {
this.convertor.outputRawValue(' | ');
else {
this.convertor.outputStringTypeName(schema, 'any', false, false);
}
if (minItems == null || i >= minItems) {
this.convertor.outputRawValue('?');
}
}
if (maxItems == null) {
if (itemCount > 0) {
this.convertor.outputRawValue(', ');
}
this.convertor.outputStringTypeName(schema, '...any[]', false, false);
}
this.convertor.outputRawValue(']');
this.convertor.outputStringTypeName(schema, '', terminate);

@@ -287,0 +298,0 @@ }

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

var schemaId_1 = tslib_1.__importDefault(require("./schemaId"));
var typeNameConvertor_1 = require("./typeNameConvertor");
function parseSchema(content, url) {

@@ -139,3 +138,4 @@ var _a = selectSchemaType(content), type = _a.type, openApiVersion = _a.openApiVersion;

});
return typeNameConvertor_1.normalizeTypeName(key.replace(/}/g, '').replace(/{/, '$'));
return key.replace(/}/g, '').replace(/{/, '$')
.replace(/^\//, '').replace(/[^0-9A-Za-z_$]+/g, '_');
}

@@ -241,10 +241,22 @@ function setSubIdToAnyObject(f, obj, keys) {

function setSubIdToMediaTypes(types, keys) {
var e_2, _a;
if (types == null) {
return;
}
var mime = 'application/json';
var mt = types[mime];
if (mt != null) {
setSubId(mt.schema, keys);
try {
for (var _b = tslib_1.__values(Object.keys(types)), _c = _b.next(); !_c.done; _c = _b.next()) {
var mime = _c.value;
if (/^text\/|^(?:application\/x-www-form-urlencoded|application\/([a-z0-9-_]+\+)?json)$/.test(mime)) {
var mt = types[mime];
setSubId(mt.schema, keys);
}
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_2) throw e_2.error; }
}
}

@@ -251,0 +263,0 @@ var setSubIdToRequestBodies = function (bodys, keys) { return setSubIdToAnyObject(setSubIdToRequestBody, bodys, keys); };

@@ -27,3 +27,4 @@ "use strict";

return tslib_1.__awaiter(this, void 0, void 0, function () {
var e_1, _a, error, _b, _c, _d, key, schema, id, fileId, result, refSchema, e_2, rootSchema, targetSchema, e_1_1;
var error, _a, _b, _c, key, schema, id, fileId, result, refSchema, e_1, rootSchema, targetSchema, e_2_1;
var e_2, _d;
return tslib_1.__generator(this, function (_e) {

@@ -37,7 +38,7 @@ switch (_e.label) {

_e.trys.push([1, 10, 11, 12]);
_b = tslib_1.__values(this.referenceCache.entries()), _c = _b.next();
_a = tslib_1.__values(this.referenceCache.entries()), _b = _a.next();
_e.label = 2;
case 2:
if (!!_c.done) return [3, 9];
_d = tslib_1.__read(_c.value, 2), key = _d[0], schema = _d[1];
if (!!_b.done) return [3, 9];
_c = tslib_1.__read(_b.value, 2), key = _c[0], schema = _c[1];
if (schema != null) {

@@ -62,4 +63,4 @@ return [3, 8];

case 5:
e_2 = _e.sent();
error.push("Fail to fetch the $ref target: " + id.getAbsoluteId() + ", " + e_2);
e_1 = _e.sent();
error.push("Fail to fetch the $ref target: " + id.getAbsoluteId() + ", " + e_1);
return [3, 8];

@@ -93,14 +94,14 @@ case 6:

case 8:
_c = _b.next();
_b = _a.next();
return [3, 2];
case 9: return [3, 12];
case 10:
e_1_1 = _e.sent();
e_1 = { error: e_1_1 };
e_2_1 = _e.sent();
e_2 = { error: e_2_1 };
return [3, 12];
case 11:
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
if (_b && !_b.done && (_d = _a.return)) _d.call(_a);
}
finally { if (e_1) throw e_1.error; }
finally { if (e_2) throw e_2.error; }
return [7];

@@ -107,0 +108,0 @@ case 12:

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

var processor = this.processor;
if (processor.indentLevel === 0) {
if (processor.indentLevel === 0 && (this.ns == null || this.ns.length > 0)) {
processor.output('declare ');

@@ -122,3 +122,3 @@ }

var processor = this.processor;
if (processor.indentLevel === 0) {
if (processor.indentLevel === 0 && (this.ns == null || this.ns.length > 0)) {
processor.output('declare ');

@@ -125,0 +125,0 @@ }

/// <reference types="node" />
import url from 'url';
import * as url from 'url';
export default class SchemaId {

@@ -4,0 +4,0 @@ readonly inputId: string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var url_1 = tslib_1.__importDefault(require("url"));
var url = tslib_1.__importStar(require("url"));
var SchemaId = (function () {

@@ -12,3 +12,3 @@ function SchemaId(inputId, parentIds) {

if (parent) {
absoluteId = url_1.default.resolve(parent, absoluteId);
absoluteId = url.resolve(parent, absoluteId);
}

@@ -24,3 +24,3 @@ });

this.absoluteId = absoluteId;
this.id = url_1.default.parse(absoluteId);
this.id = url.parse(absoluteId);
}

@@ -27,0 +27,0 @@ SchemaId.prototype.getAbsoluteId = function () {

@@ -30,6 +30,6 @@ "use strict";

}
str = str.trim();
return str.split('$').map(function (s) { return s.replace(/(?:^|[^A-Za-z0-9])([A-Za-z0-9])/g, function (_, m) {
var result = str.trim().split('$').map(function (s) { return s.replace(/(?:^|[^A-Za-z0-9])([A-Za-z0-9]|$)/g, function (_, m) {
return m.toUpperCase();
}); }).join('$');
return result;
}

@@ -36,0 +36,0 @@ function normalizeTypeName(type) {

@@ -20,3 +20,3 @@ export interface WriteProcessorOptions {

doIndent(): this;
readonly indentLevel: number;
get indentLevel(): number;
increaseIndent(): this;

@@ -23,0 +23,0 @@ decreaseIndent(): this;

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

this.alreadyIndentThisLine = false;
this.options = tslib_1.__assign({}, defaultOptions, options);
this.options = tslib_1.__assign(tslib_1.__assign({}, defaultOptions), options);
}

@@ -60,4 +60,4 @@ WriteProcessor.prototype.clear = function () {

WriteProcessor.prototype.outputJSDoc = function () {
var e_1, _a;
var _this = this;
var e_1, _a;
var comments = [];

@@ -70,3 +70,11 @@ for (var _i = 0; _i < arguments.length; _i++) {

.filter(function (comment) { return comment != null; })
.map(function (comment) { return comment.toString().split('\n').map(function (line) { return _this.protectComment(line); }); })
.map(function (comment) {
if (typeof comment === 'string') {
return comment;
}
else {
return JSON.stringify(comment, null, 2);
}
})
.map(function (comment) { return comment.split('\n').map(function (line) { return _this.protectComment(line); }); })
.forEach(function (ls) {

@@ -73,0 +81,0 @@ lines = lines.concat(ls);

{
"name": "@anttiviljami/dtsgenerator",
"version": "2.0.7",
"version": "2.5.0",
"description": "TypeScript d.ts file generator for JSON Schema file",

@@ -11,12 +11,13 @@ "bin": {

"scripts": {
"clean": "rimraf dist/ **/*.js **/*.js.map",
"clean": "rimraf dist/ build/ {src,test}/**/*.{js,js.map}",
"build": "tsc -p ./tsconfig-build.json",
"prepublishOnly": "npm run build",
"precompile": "tslint --project ./tsconfig.json",
"lint": "tslint --project ./tsconfig.json",
"precompile": "npm run lint",
"compile": "tsc -p .",
"watch": "npm run compile -- -w",
"pretest": "npm run compile",
"test": "istanbul cover _mocha test/*.js test/**/*.js",
"posttest": "remap-istanbul --input coverage/coverage.json -o coverage/report -t html",
"coverage": "remap-istanbul --input coverage/coverage.json --type text-lcov | coveralls",
"do-test": "cross-env TS_NODE_FILES=true mocha --exit --require ts-node/register --colors test/*_test.ts",
"test": "nyc npm run do-test",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"test:update-snapshot": "UPDATE_SNAPSHOT=1 npm run test"

@@ -34,40 +35,40 @@ },

"license": "MIT",
"homepage": "https://github.com/anttiviljami/dtsgenerator",
"homepage": "https://github.com/horiuchi/dtsgenerator",
"repository": {
"type": "git",
"url": "git@github.com:anttiviljami/dtsgenerator.git"
"url": "git@github.com:horiuchi/dtsgenerator.git"
},
"bugs": {
"url": "https://github.com/anttiviljami/dtsgenerator/issues"
"url": "https://github.com/horiuchi/dtsgenerator/issues"
},
"engines": {
"node": ">= 6.0"
"node": ">= 8.0"
},
"dependencies": {
"commander": "^2.20.0",
"cross-fetch": "^3.0.2",
"commander": "^5.0.0",
"cross-fetch": "^3.0.4",
"debug": "^4.1.1",
"glob": "^7.1.3",
"glob": "^7.1.6",
"js-yaml": "^3.13.1",
"mkdirp": "^0.5.1",
"tslib": "^1.9.3"
"mkdirp": "^1.0.3",
"tslib": "^1.11.1"
},
"devDependencies": {
"@types/debug": "^4.1.3",
"@types/debug": "^4.1.5",
"@types/glob": "^7.1.1",
"@types/js-yaml": "^3.12.1",
"@types/mkdirp": "^0.5.2",
"@types/mocha": "^5.2.6",
"@types/node": "^12.0.0",
"@types/power-assert": "^1.5.0",
"coveralls": "^3.0.3",
"istanbul": "^0.4.5",
"mocha": "^6.1.2",
"@types/js-yaml": "^3.12.2",
"@types/mkdirp": "^1.0.0",
"@types/mocha": "^7.0.2",
"@types/node": "^13.9.1",
"@types/power-assert": "^1.5.3",
"coveralls": "^3.0.9",
"cross-env": "^7.0.2",
"mocha": "^7.1.0",
"nyc": "^15.0.0",
"power-assert": "^1.6.1",
"remap-istanbul": "^0.13.0",
"rimraf": "^2.6.3",
"source-map-support": "^0.5.12",
"tslint": "^5.15.0",
"typescript": "^3.4.3"
"rimraf": "^3.0.2",
"ts-node": "^8.6.2",
"tslint": "^6.1.0",
"typescript": "^3.8.3"
}
}

@@ -11,2 +11,3 @@ # dtsgenerator

[![npm download count](https://img.shields.io/npm/dt/dtsgenerator.svg)](https://www.npmjs.com/package/dtsgenerator)
[![dtsgenerator Dev Token](https://badge.devtoken.rocks/dtsgenerator)](https://devtoken.rocks/package/dtsgenerator)
[![MIT license](https://img.shields.io/npm/l/dtsgenerator.svg)](#)

@@ -120,2 +121,56 @@

### [v2.5.0](https://github.com/horiuchi/dtsgenerator/releases/tag/v2.5.0) (2020-02-28)
- features:
- Add to support the text media type on Open API Schema by #396. Thank you @silesky :+1:
### [v2.4.1](https://github.com/horiuchi/dtsgenerator/releases/tag/v2.4.1) (2020-02-05)
- fixed
- Fix: the bug of #386. thank you for reporting issue @Oloompa :+1:
### [v2.4.0](https://github.com/horiuchi/dtsgenerator/releases/tag/v2.4.0) (2020-02-04)
- fixed
- Fix: typescript import statement #381. thank you @lupus92 :+1:
- Fix: use `export` when given empty namespace #386. Thank you @zregvart :+1:
### [v2.3.2](https://github.com/horiuchi/dtsgenerator/releases/tag/v2.3.2) (2019-11-21)
- fixed
- Fix: the bug of the specific identifier #375. Thank you for reporting the bug @adriengibrat :+1:
### [v2.3.1](https://github.com/horiuchi/dtsgenerator/releases/tag/v2.3.1) (2019-09-02)
- features:
- Support the dynamic JSON media type #363. Thank you @buelsenfrucht :+1:
- Add to support the `number` type enum values #365. Thank you @vincentlin02 :+1:
### [v2.3.0](https://github.com/horiuchi/dtsgenerator/releases/tag/v2.3.0) (2019-08-23)
- features:
- Improve the tuple type output by TypeScript v3 syntax, and Support `maxItems` property #339. Thank you @keean :+1:
### [v2.2.0](https://github.com/horiuchi/dtsgenerator/releases/tag/v2.2.0) (2019-08-06)
- fixed
- Fix: "_" character at the end of generated type #358. Thank you @KostblLb :+1:
### [v2.1.0](https://github.com/horiuchi/dtsgenerator/releases/tag/v2.1.0) (2019-07-18)
- features:
- Add to support objected example #356. Thank you for reporting the issue #348 by @fantapop :+1:
- Add to support the `application/x-www-form-urlencoded` branch on OpenAPI. #357
### [v2.0.8](https://github.com/horiuchi/dtsgenerator/releases/tag/v2.0.8) (2019-06-25)
- fixed
- Fix: OneOf + type "object" produces empty interface #351. Thank you @polomani :+1:
### [v2.0.7](https://github.com/horiuchi/dtsgenerator/releases/tag/v2.0.7) (2019-05-07)
- fixed
- Fix: typename when the path is nested #334. Thank you @steelydylan :+1:
- Fix: Support ref objects for OAS3 requestBodies + responses #343. Thank you @anttiviljami :+1:
### [v2.0.6](https://github.com/horiuchi/dtsgenerator/releases/tag/v2.0.6) (2019-02-14)

@@ -148,26 +203,4 @@

### [v1.2.0](https://github.com/horiuchi/dtsgenerator/releases/tag/v1.2.0) (2018-09-12)
### older versions history
- features
- Add `--namespace <namespace>` option to control the emitted namespace. Thank you @DavidBiesack :+1:
### [v1.1.0](https://github.com/horiuchi/dtsgenerator/releases/tag/v1.1.0) (2018-06-01)
- features
- Add [the supported features document](https://github.com/horiuchi/dtsgenerator/blob/master/SupportedFeatures.md)
- Support some properties
- `title`, `const`, `readOnly`
### [v1.0.0](https://github.com/horiuchi/dtsgenerator/releases/tag/v1.0.0) (2018-03-22)
- features
- Support JSON Schema Draft-07 and OpenAPI v3
- Add the library interface for customize type name
- Remove some unusual command line options
- And rebuild the architecture
- others
- Remove the node v4 support
### other versions
[ChangeLogs](https://github.com/horiuchi/dtsgenerator/blob/master/CHANGELOG.md)

@@ -174,0 +207,0 @@

@@ -31,3 +31,3 @@ Supported Features

|items|o|Array type or Tuple type|
|maxItems|x||
|maxItems|p|on using Tuple type definition|
|minItems|p|on using Tuple type definition|

@@ -98,7 +98,18 @@ |uniqueItems|x||

|/components/parameters/*/schema|
|/components/requestBodies/*/content/"application/json"|
|/components/responses/*/content/"application/json"|
|/components/requestBodies/*/content/[Media Type]|
|/components/requestBodies/*/$ref|
|/components/responses/*/content/[Media Type]|
|/components/responses/*/$ref|
|/paths/\*/parameters/*/schema|
|/paths/\*/(get\|put\|post\|delete\|options\|head\|patch\|trace)/parameters/*/schema|
|/paths/\*/(get\|put\|post\|delete\|options\|head\|patch\|trace)/requestBodies/*/content/"application/json"|
|/paths/\*/(get\|put\|post\|delete\|options\|head\|patch\|trace)/responses/*/content/"application/json"|
|/paths/\*/(get\|put\|post\|delete\|options\|head\|patch\|trace)/requestBodies/*/content/[Media Type]|
|/paths/\*/(get\|put\|post\|delete\|options\|head\|patch\|trace)/requestBodies/*/$ref|
|/paths/\*/(get\|put\|post\|delete\|options\|head\|patch\|trace)/responses/*/content/[Media Type]|
|/paths/\*/(get\|put\|post\|delete\|options\|head\|patch\|trace)/responses/*/$ref|
### Support Media Type
- `application/json`
- `application/x-www-form-urlencoded`
- `application/*+json`
- `text/*`

@@ -7,8 +7,9 @@ {

"rootDir": "./src",
"removeComments": true
"removeComments": true,
"noEmit": false
},
"include": [
"src"
"src/"
]
}
{
"compilerOptions": {
/* Basic Options */
"typeRoots": ["node_modules/@types"],
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": [
"dom",
"es2017"
], /* Specify library files to be included in the compilation. */
"incremental": true, /* Enable incremental compilation */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
"lib": ["DOM", "ES2017"], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */

@@ -15,6 +12,9 @@ // "checkJs": true, /* Report errors in .js files. */

// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
"sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
// "outDir": "./dist", /* Redirect output structure to the directory. */
"outDir": "./build", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
// "removeComments": true, /* Do not emit comments to output. */

@@ -31,2 +31,3 @@ // "noEmit": true, /* Do not emit outputs. */

// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */

@@ -50,8 +51,9 @@ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */

// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
/* Source Map Options */
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */

@@ -63,12 +65,13 @@ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */

// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
/* Advanced Options */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
},
"include": [
"src",
"test"
"src/",
"test/"
],
"exclude": [
"dist/",
"example",
"test/snapshots"
"test/snapshots/"
]
}

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

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

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