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.1.2 to 2.1.3

28

dist/create_helpers.js

@@ -9,2 +9,24 @@ "use strict";

const readonlyModifier = ts.createModifier(ts.SyntaxKind.ReadonlyKeyword);
const rgxIdentifier = /^[a-zA-Z\$_][a-zA-Z0-9\$_]+$/;
const reservedWords = [
'break', 'do', 'instanceof', 'typeof',
'case', 'else', 'new', 'var',
'catch', 'finally', 'return', 'void',
'continue', 'for', 'switch', 'while',
'debugger', 'function', 'this', 'with',
'default', 'if', 'throw',
'delete', 'in', 'try',
'class', 'enum', 'extends', 'super',
'const', 'export', 'import',
'implements', 'let', 'private', 'public', 'yield',
'interface', 'package', 'protected', 'static',
'null', 'true', 'false',
];
function isValidIdentifier(name) {
if (!name || !rgxIdentifier.test(name))
return false;
if (reservedWords.indexOf(name) !== -1)
return false;
return true;
}
function validateClassLikeChildren(children, validate, msg) {

@@ -187,3 +209,7 @@ if (children) {

}
const name = ts.createIdentifier(doclet.name);
let name;
if (isValidIdentifier(doclet.name))
name = ts.createIdentifier(doclet.name);
else
name = ts.createStringLiteral(doclet.name);
return handleComment(doclet, ts.createModuleDeclaration(undefined, mods, name, body, flags));

@@ -190,0 +216,0 @@ }

2

package.json
{
"name": "tsd-jsdoc",
"version": "2.1.2",
"version": "2.1.3",
"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

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