Comparing version 2.1.0 to 2.1.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function assertNever(x) { | ||
throw new Error("Unexpected object: " + x); | ||
throw new Error("Unexpected object: " + JSON.stringify(x)); | ||
} | ||
exports.assertNever = assertNever; | ||
//# sourceMappingURL=assert_never.js.map |
@@ -97,4 +97,2 @@ "use strict"; | ||
mods.push(declareModifier); | ||
if (doclet.scope === 'static') | ||
mods.push(ts.createModifier(ts.SyntaxKind.StaticKeyword)); | ||
if (doclet.access === 'private') | ||
@@ -106,2 +104,4 @@ mods.push(ts.createModifier(ts.SyntaxKind.PrivateKeyword)); | ||
mods.push(ts.createModifier(ts.SyntaxKind.PublicKeyword)); | ||
if (doclet.scope === 'static') | ||
mods.push(ts.createModifier(ts.SyntaxKind.StaticKeyword)); | ||
if (doclet.name.startsWith('exports.')) | ||
@@ -145,6 +145,2 @@ doclet.name = doclet.name.replace('exports.', ''); | ||
const type = type_resolve_helpers_1.resolveType(doclet.type, doclet); | ||
if (doclet.kind === 'constant' || doclet.readonly) | ||
mods.push(readonlyModifier); | ||
if (doclet.scope === 'static') | ||
mods.push(ts.createModifier(ts.SyntaxKind.StaticKeyword)); | ||
if (doclet.access === 'private') | ||
@@ -156,2 +152,6 @@ mods.push(ts.createModifier(ts.SyntaxKind.PrivateKeyword)); | ||
mods.push(ts.createModifier(ts.SyntaxKind.PublicKeyword)); | ||
if (doclet.scope === 'static') | ||
mods.push(ts.createModifier(ts.SyntaxKind.StaticKeyword)); | ||
if (doclet.kind === 'constant' || doclet.readonly) | ||
mods.push(readonlyModifier); | ||
return handleComment(doclet, ts.createProperty(undefined, mods, doclet.name, undefined, type, undefined)); | ||
@@ -158,0 +158,0 @@ } |
@@ -127,3 +127,5 @@ "use strict"; | ||
for (let i = 0; i < this._treeRoots.length; ++i) { | ||
this.results.push(this._parseTreeNode(this._treeRoots[i])); | ||
const node = this._parseTreeNode(this._treeRoots[i]); | ||
if (node) | ||
this.results.push(node); | ||
} | ||
@@ -135,3 +137,5 @@ } | ||
for (let i = 0; i < node.children.length; ++i) { | ||
children.push(this._parseTreeNode(node.children[i], node)); | ||
const childNode = this._parseTreeNode(node.children[i], node); | ||
if (childNode) | ||
children.push(childNode); | ||
} | ||
@@ -171,2 +175,4 @@ } | ||
return create_helpers_1.createTypedef(node.doclet, children); | ||
case 'event': | ||
return null; | ||
default: | ||
@@ -173,0 +179,0 @@ return assert_never_1.assertNever(node.doclet); |
@@ -28,3 +28,3 @@ "use strict"; | ||
const pkg = pkgArray[0]; | ||
const out = path.join(opts.destination, pkg && pkg.name ? `${pkg.name}.d.ts` : 'types.d.ts'); | ||
const out = path.join(opts.destination, opts.outFile || pkg && pkg.name ? `${pkg.name}.d.ts` : 'types.d.ts'); | ||
fs.writeFileSync(out, emitter.emit()); | ||
@@ -31,0 +31,0 @@ } |
{ | ||
"name": "tsd-jsdoc", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Compiles JSDoc annotated javascript into a Typescript Declaration File (.d.ts).", | ||
@@ -5,0 +5,0 @@ "main": "dist/publish.js", |
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
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
78666
880