Socket
Socket
Sign inDemoInstall

tsd-jsdoc

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsd-jsdoc - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

17

dist/type_resolve_helpers.js

@@ -258,2 +258,14 @@ "use strict";

}
else if (upperName === 'CLASS') {
let valType = parent.types[0];
if (!valType) {
logger_1.warn('Unable to resolve array value type, defaulting to \`any\`.', parent);
valType = anyGeneric;
}
if (!valType.resolved) {
logger_1.warn('Unable to resolve array value type, defaulting to \`any\`.', parent);
valType.resolved = anyTypeNode;
}
lastType = parent.resolved = ts.createTypeQueryNode(ts.createIdentifier(valType.name));
}
else {

@@ -311,5 +323,8 @@ const typeNodes = [];

const node = tree.roots[i];
const type = node.children.length ? createTypeLiteral(node.children) : resolveType(node.prop.type);
const opt = resolveOptional(node.prop);
const dots = resolveVariable(node.prop);
let type = node.children.length ? createTypeLiteral(node.children) : resolveType(node.prop.type);
if (dots) {
type = ts.createArrayTypeNode(type);
}
params.push(ts.createParameter(undefined, undefined, dots, node.name, opt, type, undefined));

@@ -316,0 +331,0 @@ }

2

package.json
{
"name": "tsd-jsdoc",
"version": "2.0.4",
"version": "2.0.5",
"description": "Compiles JSDoc annotated javascript into a Typescript Declaration File (.d.ts).",

@@ -5,0 +5,0 @@ "main": "dist/publish.js",

@@ -99,1 +99,8 @@ # tsd-jsdoc

- [`@template`](https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#template-t) - For generics
## Extended support for TS features
JSDoc doesn't have a way to express all the features of typescript so we treat some syntax as special case to
create better Typescript.
- `Class<T>` - If we encounter a type that is `Class<T>` we will treat it as `typeof T`. See [jsdoc3/jsdoc#1349](https://github.com/jsdoc3/jsdoc/issues/1349)

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