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

typedoc-plugin-typescript-declaration

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typedoc-plugin-typescript-declaration - npm Package Compare versions

Comparing version 0.2.13 to 0.3.0

59

dist/index.js

@@ -290,2 +290,5 @@ 'use strict';

}
if (type.type === 'query') {
return `typeof ${TypeFormatter.format(type.queryType)}`;
}
const other = type;

@@ -998,27 +1001,2 @@ if (other.name) {

class KeyOfCommentResolver {
resolveKeys(project, reflection, override = false) {
const node = reflection;
const type = node.type;
const reference = this.getDeclaration(project, type.target);
let keys = this.getKeys(reference)
.sort(propertySorter(r => r.id))
.map(r => { var _a, _b; return ((_a = type.target) === null || _a === void 0 ? void 0 : _a.type) === 'reference' ? `[[${(_b = type.target) === null || _b === void 0 ? void 0 : _b.name}.${r.name}|\`${r.name}\`]]` : `\`${r.name}\``; })
.join(', ');
if (!node.comment) {
node.comment = new models.Comment();
}
if (!node.comment.tags) {
node.comment.tags = [];
}
let tag = node.comment.getTag('keys');
if (tag) {
if (override) {
tag.text = keys;
}
}
else {
tag = new models.CommentTag('keys', undefined, keys);
node.comment.tags.push(tag);
}
}
shouldResolveKeys(project, reflection) {

@@ -1097,20 +1075,2 @@ var _a, _b, _c;

var AddKeysTagOption;
(function (AddKeysTagOption) {
AddKeysTagOption[AddKeysTagOption["off"] = 0] = "off";
AddKeysTagOption[AddKeysTagOption["add"] = 1] = "add";
AddKeysTagOption[AddKeysTagOption["update"] = 2] = "update";
})(AddKeysTagOption || (AddKeysTagOption = {}));
const addKeysOptionMapping = {
off: AddKeysTagOption.off,
add: AddKeysTagOption.add,
update: AddKeysTagOption.update,
};
const keyofCommentsOption = {
name: 'keyofComments',
type: declaration.ParameterType.Map,
help: 'Expands the values of the keyof operator and adds a tag, default is set to off',
defaultValue: AddKeysTagOption.off,
map: addKeysOptionMapping,
};
class KeyOfPlugin extends components$1.ConverterComponent {

@@ -1124,8 +1084,2 @@ initialize() {

const resolver = KeyOfCommentResolver.instance();
if (this._mode !== AddKeysTagOption.off) {
const override = this._mode === AddKeysTagOption.update;
Object.values(context.project.reflections)
.filter(item => resolver.shouldResolveKeys(context.project, item))
.forEach(item => resolver.resolveKeys(context.project, item, override));
}
Object.values(context.project.reflections)

@@ -1136,8 +1090,3 @@ .filter(item => resolver.shouldInlineKeys(context.project, item))

}
KeyOfPlugin.options = [
keyofCommentsOption,
];
__decorate([
utils.BindOption(keyofCommentsOption.name)
], KeyOfPlugin.prototype, "_mode", void 0);
KeyOfPlugin.options = [];

@@ -1144,0 +1093,0 @@ const omitTagOption = {

2

package.json
{
"name": "typedoc-plugin-typescript-declaration",
"version": "0.2.13",
"version": "0.3.0",
"description": "Typedoc plugin to render to typescript declaration file",

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

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