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

@microsoft/tsdoc

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/tsdoc - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

lib/details/StandardModifierTagSet.d.ts

9

CHANGELOG.md
# Change Log - @microsoft/tsdoc
## 0.2.0
Thu, 23 Aug 2018
- Rename `CoreTags` to `StandardTags` so we can include non-core tags in the standard definitions
- Rename `CoreModifierTagSet` to `StandardModifierTagSet` and convert properties to functions
- Categorize the standard tags according to a `Standardization` enum, and document them
- Add more standard tag definitions: `@deprecated`, `@eventProperty`, `@example`, `@inheritDoc`, `@link`, `@override`, `@packageDocumentation`, `@public`, `@privateRemarks`, `@sealed`, `@virtual`
- Replace TSDocTagDefinition.singleton with TSDocTagDefinition.allowMultiple, since in practice most tags are single-usage
## 0.1.0

@@ -4,0 +13,0 @@ Thu, 16 Aug 2018

6

lib/__tests__/ParsingBasics.test.js

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

var modifierTagSet = docComment.modifierTagSet;
expect(modifierTagSet.isAlpha).toEqual(false);
expect(modifierTagSet.isBeta).toEqual(true);
expect(modifierTagSet.isInternal).toEqual(true);
expect(modifierTagSet.isAlpha()).toEqual(false);
expect(modifierTagSet.isBeta()).toEqual(true);
expect(modifierTagSet.isInternal()).toEqual(true);
});

@@ -20,0 +20,0 @@ test('02 A basic TSDoc comment with all components', function () {

@@ -1,3 +0,3 @@

export { CoreTags } from './details/CoreTags';
export { CoreModifierTagSet } from './details/CoreModifierTagSet';
export { StandardTags, Standardization } from './details/StandardTags';
export { StandardModifierTagSet } from './details/StandardModifierTagSet';
export { ModifierTagSet } from './details/ModifierTagSet';

@@ -13,2 +13,2 @@ export * from './nodes';

export { TSDocParser } from './parser/TSDocParser';
export { TSDocTagSyntaxKind, TSDocTagDefinition, TSDocParserConfiguration } from './parser/TSDocParserConfiguration';
export { ITSDocTagDefinitionParameters, TSDocTagSyntaxKind, TSDocTagDefinition, TSDocParserConfiguration } from './parser/TSDocParserConfiguration';

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

Object.defineProperty(exports, "__esModule", { value: true });
var CoreTags_1 = require("./details/CoreTags");
exports.CoreTags = CoreTags_1.CoreTags;
var CoreModifierTagSet_1 = require("./details/CoreModifierTagSet");
exports.CoreModifierTagSet = CoreModifierTagSet_1.CoreModifierTagSet;
var StandardTags_1 = require("./details/StandardTags");
exports.StandardTags = StandardTags_1.StandardTags;
var StandardModifierTagSet_1 = require("./details/StandardModifierTagSet");
exports.StandardModifierTagSet = StandardModifierTagSet_1.StandardModifierTagSet;
var ModifierTagSet_1 = require("./details/ModifierTagSet");

@@ -12,0 +12,0 @@ exports.ModifierTagSet = ModifierTagSet_1.ModifierTagSet;

import { DocNode, DocNodeKind, IDocNodeParameters } from './DocNode';
import { ParserContext } from '../parser/ParserContext';
import { DocSection } from './DocSection';
import { CoreModifierTagSet } from '../details/CoreModifierTagSet';
import { StandardModifierTagSet } from '../details/StandardModifierTagSet';
import { DocBlock } from './DocBlock';

@@ -52,3 +52,3 @@ import { DocParamBlock } from './DocParamBlock';

*/
readonly modifierTagSet: CoreModifierTagSet;
readonly modifierTagSet: StandardModifierTagSet;
private _customBlocks;

@@ -55,0 +55,0 @@ /**

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

var DocSection_1 = require("./DocSection");
var CoreModifierTagSet_1 = require("../details/CoreModifierTagSet");
var StandardModifierTagSet_1 = require("../details/StandardModifierTagSet");
/**

@@ -38,3 +38,3 @@ * Represents an entire documentation comment conforming to the TSDoc structure.

_this.returnsBlock = undefined;
_this.modifierTagSet = new CoreModifierTagSet_1.CoreModifierTagSet();
_this.modifierTagSet = new StandardModifierTagSet_1.StandardModifierTagSet();
_this._customBlocks = [];

@@ -41,0 +41,0 @@ return _this;

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

var TSDocParserConfiguration_1 = require("./TSDocParserConfiguration");
var CoreTags_1 = require("../details/CoreTags");
var StandardTags_1 = require("../details/StandardTags");
function isFailure(resultOrFailure) {

@@ -107,3 +107,3 @@ return resultOrFailure !== undefined && resultOrFailure.hasOwnProperty('failureMessage');

case TSDocParserConfiguration_1.TSDocTagSyntaxKind.BlockTag:
if (docBlockTag.tagNameWithUpperCase === CoreTags_1.CoreTags.param.tagNameWithUpperCase) {
if (docBlockTag.tagNameWithUpperCase === StandardTags_1.StandardTags.param.tagNameWithUpperCase) {
var docParamBlock = this._parseParamBlock(docBlockTag);

@@ -138,6 +138,6 @@ this._parserContext.docComment.paramBlocks.push(docParamBlock);

switch (block.blockTag.tagNameWithUpperCase) {
case CoreTags_1.CoreTags.remarks.tagNameWithUpperCase:
case StandardTags_1.StandardTags.remarks.tagNameWithUpperCase:
docComment.remarksBlock = block;
break;
case CoreTags_1.CoreTags.returns.tagNameWithUpperCase:
case StandardTags_1.StandardTags.returns.tagNameWithUpperCase:
docComment.returnsBlock = block;

@@ -144,0 +144,0 @@ break;

@@ -0,1 +1,2 @@

import { Standardization } from '../details/StandardTags';
/**

@@ -23,8 +24,14 @@ * Determines the type of syntax for a TSDocTagDefinition

*/
interface ITSDocTagDefinitionParameters {
export interface ITSDocTagDefinitionParameters {
tagName: string;
syntaxKind: TSDocTagSyntaxKind;
singleton?: boolean;
allowMultiple?: boolean;
}
/**
* @internal
*/
export interface ITSDocTagDefinitionInternalParameters extends ITSDocTagDefinitionParameters {
standardization: Standardization;
}
/**
* Defines a TSDoc tag that will be understood by the TSDocParser.

@@ -48,5 +55,11 @@ */

/**
* If true, then at most one instance of this TSDoc tag may appear in a doc comment.
* Indicates the level of support expected from documentation tools that implement
* the standard.
*/
readonly singleton: boolean;
readonly standardization: Standardization;
/**
* If true, then this TSDoc tag may appear multiple times in a doc comment.
* By default, a tag may only appear once.
*/
readonly allowMultiple: boolean;
constructor(parameters: ITSDocTagDefinitionParameters);

@@ -81,2 +94,1 @@ }

}
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var StringChecks_1 = require("./StringChecks");
var CoreTags_1 = require("../details/CoreTags");
var StandardTags_1 = require("../details/StandardTags");
/**

@@ -34,3 +34,5 @@ * Determines the type of syntax for a TSDocTagDefinition

this.syntaxKind = parameters.syntaxKind;
this.singleton = !!parameters.singleton;
this.standardization = parameters.standardization
|| "None" /* None */;
this.allowMultiple = !!parameters.allowMultiple;
}

@@ -47,3 +49,3 @@ return TSDocTagDefinition;

this._tagDefinitionsByName = new Map();
this.addTagDefinitions(CoreTags_1.CoreTags.allDefinitions);
this.addTagDefinitions(StandardTags_1.StandardTags.allDefinitions);
}

@@ -50,0 +52,0 @@ Object.defineProperty(TSDocParserConfiguration.prototype, "tagDefinitions", {

{
"name": "@microsoft/tsdoc",
"version": "0.1.0",
"version": "0.2.0",
"description": "A parser for the TypeScript doc comment syntax",

@@ -5,0 +5,0 @@ "keywords": [

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