@microsoft/api-extractor
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -5,2 +5,14 @@ { | ||
{ | ||
"version": "1.1.6", | ||
"tag": "@microsoft/api-extractor_v1.1.6", | ||
"date": "Wed, 01 Feb 2017 20:09:30 GMT", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"comment": "Added ApiItemKind enum and refactored child classes." | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "1.1.5", | ||
@@ -7,0 +19,0 @@ "tag": "@microsoft/api-extractor_v1.1.5", |
# Change Log - @microsoft/api-extractor | ||
This log was last generated on Fri, 27 Jan 2017 20:04:15 GMT and should not be manually modified. | ||
This log was last generated on Wed, 01 Feb 2017 20:09:30 GMT and should not be manually modified. | ||
## 1.1.6 | ||
Wed, 01 Feb 2017 20:09:30 GMT | ||
### Patches | ||
- Added ApiItemKind enum and refactored child classes. | ||
## 1.1.5 | ||
@@ -6,0 +13,0 @@ Fri, 27 Jan 2017 20:04:15 GMT |
@@ -7,2 +7,3 @@ "use strict"; | ||
}; | ||
var ApiItem_1 = require("./ApiItem"); | ||
var ApiItemContainer_1 = require("./ApiItemContainer"); | ||
@@ -19,2 +20,3 @@ var ApiEnumValue_1 = require("./ApiEnumValue"); | ||
var _this = _super.call(this, options) || this; | ||
_this.kind = ApiItem_1.ApiItemKind.Enum; | ||
for (var _i = 0, _a = options.declaration.members; _i < _a.length; _i++) { | ||
@@ -21,0 +23,0 @@ var memberDeclaration = _a[_i]; |
@@ -16,3 +16,5 @@ "use strict"; | ||
function ApiEnumValue(options) { | ||
return _super.call(this, options) || this; | ||
var _this = _super.call(this, options) || this; | ||
_this.kind = ApiItem_1.ApiItemKind.EnumValue; | ||
return _this; | ||
} | ||
@@ -19,0 +21,0 @@ /** |
@@ -21,2 +21,3 @@ "use strict"; | ||
var _this = _super.call(this, options) || this; | ||
_this.kind = ApiItem_1.ApiItemKind.Function; | ||
var methodDeclaration = options.declaration; | ||
@@ -23,0 +24,0 @@ // Parameters |
@@ -5,2 +5,47 @@ import * as ts from 'typescript'; | ||
/** | ||
* Indicates the type of definition represented by a ApiItem object. | ||
*/ | ||
export declare enum ApiItemKind { | ||
/** | ||
* A TypeScript class. | ||
*/ | ||
Class = 0, | ||
/** | ||
* A TypeScript enum. | ||
*/ | ||
Enum = 1, | ||
/** | ||
* A TypeScript value on an enum. | ||
*/ | ||
EnumValue = 2, | ||
/** | ||
* A TypeScript function. | ||
*/ | ||
Function = 3, | ||
/** | ||
* A TypeScript interface. | ||
*/ | ||
Interface = 4, | ||
/** | ||
* A TypeScript method. | ||
*/ | ||
Method = 5, | ||
/** | ||
* A TypeScript package. | ||
*/ | ||
Package = 6, | ||
/** | ||
* A TypeScript parameter. | ||
*/ | ||
Parameter = 7, | ||
/** | ||
* A TypeScript property. | ||
*/ | ||
Property = 8, | ||
/** | ||
* A TypeScript type literal expression, i.e. which defines an anonymous interface. | ||
*/ | ||
TypeLiteral = 9, | ||
} | ||
/** | ||
* This interface is used to pass options between constructors for ApiItem child classes. | ||
@@ -51,2 +96,6 @@ */ | ||
/** | ||
* Indicates the type of definition represented by this ApiItem instance. | ||
*/ | ||
kind: ApiItemKind; | ||
/** | ||
* A list of extractor warnings that were reported using ApiItem.reportWarning(). | ||
@@ -53,0 +102,0 @@ * Whereas an "error" will break the build, a "warning" will merely be tracked in |
@@ -7,2 +7,48 @@ /* tslint:disable:no-bitwise */ | ||
/** | ||
* Indicates the type of definition represented by a ApiItem object. | ||
*/ | ||
var ApiItemKind; | ||
(function (ApiItemKind) { | ||
/** | ||
* A TypeScript class. | ||
*/ | ||
ApiItemKind[ApiItemKind["Class"] = 0] = "Class"; | ||
/** | ||
* A TypeScript enum. | ||
*/ | ||
ApiItemKind[ApiItemKind["Enum"] = 1] = "Enum"; | ||
/** | ||
* A TypeScript value on an enum. | ||
*/ | ||
ApiItemKind[ApiItemKind["EnumValue"] = 2] = "EnumValue"; | ||
/** | ||
* A TypeScript function. | ||
*/ | ||
ApiItemKind[ApiItemKind["Function"] = 3] = "Function"; | ||
/** | ||
* A TypeScript interface. | ||
*/ | ||
ApiItemKind[ApiItemKind["Interface"] = 4] = "Interface"; | ||
/** | ||
* A TypeScript method. | ||
*/ | ||
ApiItemKind[ApiItemKind["Method"] = 5] = "Method"; | ||
/** | ||
* A TypeScript package. | ||
*/ | ||
ApiItemKind[ApiItemKind["Package"] = 6] = "Package"; | ||
/** | ||
* A TypeScript parameter. | ||
*/ | ||
ApiItemKind[ApiItemKind["Parameter"] = 7] = "Parameter"; | ||
/** | ||
* A TypeScript property. | ||
*/ | ||
ApiItemKind[ApiItemKind["Property"] = 8] = "Property"; | ||
/** | ||
* A TypeScript type literal expression, i.e. which defines an anonymous interface. | ||
*/ | ||
ApiItemKind[ApiItemKind["TypeLiteral"] = 9] = "TypeLiteral"; | ||
})(ApiItemKind = exports.ApiItemKind || (exports.ApiItemKind = {})); | ||
/** | ||
* ApiItem is an abstract base that represents TypeScript API definitions such as classes, | ||
@@ -9,0 +55,0 @@ * interfaces, enums, properties, functions, and variables. Rather than directly using the |
@@ -7,2 +7,3 @@ "use strict"; | ||
}; | ||
var ApiItem_1 = require("./ApiItem"); | ||
var ApiMember_1 = require("./ApiMember"); | ||
@@ -22,2 +23,3 @@ var ApiParameter_1 = require("./ApiParameter"); | ||
var _this = _super.call(this, options) || this; | ||
_this.kind = ApiItem_1.ApiItemKind.Method; | ||
var methodDeclaration = options.declaration; | ||
@@ -24,0 +26,0 @@ // Parameters |
@@ -12,2 +12,3 @@ /* tslint:disable:no-bitwise */ | ||
var ApiFunction_1 = require("./ApiFunction"); | ||
var ApiItem_1 = require("./ApiItem"); | ||
var ApiItemContainer_1 = require("./ApiItemContainer"); | ||
@@ -23,2 +24,3 @@ var TypeScriptHelpers_1 = require("../TypeScriptHelpers"); | ||
var _this = _super.call(this, ApiPackage._getOptions(extractor, rootFile)) || this; | ||
_this.kind = ApiItem_1.ApiItemKind.Package; | ||
var exportSymbols = _this.typeChecker.getExportsOfModule(_this.declarationSymbol); | ||
@@ -25,0 +27,0 @@ if (exportSymbols) { |
@@ -15,2 +15,3 @@ "use strict"; | ||
var _this = _super.call(this, options) || this; | ||
_this.kind = ApiItem_1.ApiItemKind.Parameter; | ||
_this.documentation.docComment = docComment; | ||
@@ -17,0 +18,0 @@ var parameterDeclaration = options.declaration; |
@@ -7,2 +7,3 @@ "use strict"; | ||
}; | ||
var ApiItem_1 = require("./ApiItem"); | ||
var ApiMember_1 = require("./ApiMember"); | ||
@@ -17,2 +18,3 @@ /** | ||
var _this = _super.call(this, options) || this; | ||
_this.kind = ApiItem_1.ApiItemKind.Property; | ||
_this.isReadOnly = _this.documentation.readonly ? _this.documentation.readonly : false; | ||
@@ -19,0 +21,0 @@ var declaration = options.declaration; /* tslint:disable-line:no-any */ |
@@ -5,19 +5,2 @@ import * as ts from 'typescript'; | ||
/** | ||
* Indicates the type of definition represented by a ApiStructuredType object. | ||
*/ | ||
export declare enum ApiStructuredTypeKind { | ||
/** | ||
* A TypeScript class. | ||
*/ | ||
Class = 0, | ||
/** | ||
* A TypeScript interface. | ||
*/ | ||
Interface = 1, | ||
/** | ||
* A TypeScript type literal expression, i.e. which defines an anonymous interface. | ||
*/ | ||
TypeLiteral = 2, | ||
} | ||
/** | ||
* This class is part of the ApiItem abstract syntax tree. It represents a class, | ||
@@ -27,3 +10,2 @@ * interface, or type literal expression. | ||
export default class ApiStructuredType extends ApiItemContainer { | ||
kind: ApiStructuredTypeKind; | ||
implements?: string; | ||
@@ -30,0 +12,0 @@ extends?: string; |
@@ -11,2 +11,3 @@ /* tslint:disable:no-bitwise */ | ||
var ApiProperty_1 = require("./ApiProperty"); | ||
var ApiItem_1 = require("./ApiItem"); | ||
var ApiItemContainer_1 = require("./ApiItemContainer"); | ||
@@ -16,20 +17,2 @@ var TypeScriptHelpers_1 = require("../TypeScriptHelpers"); | ||
/** | ||
* Indicates the type of definition represented by a ApiStructuredType object. | ||
*/ | ||
var ApiStructuredTypeKind; | ||
(function (ApiStructuredTypeKind) { | ||
/** | ||
* A TypeScript class. | ||
*/ | ||
ApiStructuredTypeKind[ApiStructuredTypeKind["Class"] = 0] = "Class"; | ||
/** | ||
* A TypeScript interface. | ||
*/ | ||
ApiStructuredTypeKind[ApiStructuredTypeKind["Interface"] = 1] = "Interface"; | ||
/** | ||
* A TypeScript type literal expression, i.e. which defines an anonymous interface. | ||
*/ | ||
ApiStructuredTypeKind[ApiStructuredTypeKind["TypeLiteral"] = 2] = "TypeLiteral"; | ||
})(ApiStructuredTypeKind = exports.ApiStructuredTypeKind || (exports.ApiStructuredTypeKind = {})); | ||
/** | ||
* This class is part of the ApiItem abstract syntax tree. It represents a class, | ||
@@ -47,9 +30,9 @@ * interface, or type literal expression. | ||
if (_this.declarationSymbol.flags & ts.SymbolFlags.Interface) { | ||
_this.kind = ApiStructuredTypeKind.Interface; | ||
_this.kind = ApiItem_1.ApiItemKind.Interface; | ||
} | ||
else if (_this.declarationSymbol.flags & ts.SymbolFlags.TypeLiteral) { | ||
_this.kind = ApiStructuredTypeKind.TypeLiteral; | ||
_this.kind = ApiItem_1.ApiItemKind.TypeLiteral; | ||
} | ||
else { | ||
_this.kind = ApiStructuredTypeKind.Class; | ||
_this.kind = ApiItem_1.ApiItemKind.Class; | ||
} | ||
@@ -121,3 +104,3 @@ for (var _i = 0, _a = _this._classLikeDeclaration.members; _i < _a.length; _i++) { | ||
var result = ''; | ||
if (this.kind !== ApiStructuredTypeKind.TypeLiteral) { | ||
if (this.kind !== ApiItem_1.ApiItemKind.TypeLiteral) { | ||
result += (this.declarationSymbol.flags & ts.SymbolFlags.Interface) | ||
@@ -124,0 +107,0 @@ ? 'interface ' : 'class '; |
@@ -8,3 +8,3 @@ "use strict"; | ||
var fs = require("fs"); | ||
var ApiStructuredType_1 = require("../definitions/ApiStructuredType"); | ||
var ApiItem_1 = require("../definitions/ApiItem"); | ||
var ApiItemVisitor_1 = require("../ApiItemVisitor"); | ||
@@ -68,3 +68,3 @@ var ApiPackage_1 = require("../definitions/ApiPackage"); | ||
} | ||
if (apiStructuredType.kind !== ApiStructuredType_1.ApiStructuredTypeKind.TypeLiteral) { | ||
if (apiStructuredType.kind !== ApiItem_1.ApiItemKind.TypeLiteral) { | ||
this._writeJsdocSynopsis(apiStructuredType); | ||
@@ -71,0 +71,0 @@ } |
@@ -10,3 +10,3 @@ "use strict"; | ||
var ts = require("typescript"); | ||
var ApiStructuredType_1 = require("../definitions/ApiStructuredType"); | ||
var ApiItem_1 = require("../definitions/ApiItem"); | ||
var ApiItemVisitor_1 = require("../ApiItemVisitor"); | ||
@@ -53,4 +53,4 @@ var ApiMember_1 = require("../definitions/ApiMember"); | ||
ApiJsonGenerator.prototype.visitApiStructuredType = function (apiStructuredType, refObject) { | ||
var kind = apiStructuredType.kind === ApiStructuredType_1.ApiStructuredTypeKind.Class ? ApiJsonGenerator._KIND_CLASS : | ||
apiStructuredType.kind === ApiStructuredType_1.ApiStructuredTypeKind.Interface ? ApiJsonGenerator._KIND_INTERFACE : | ||
var kind = apiStructuredType.kind === ApiItem_1.ApiItemKind.Class ? ApiJsonGenerator._KIND_CLASS : | ||
apiStructuredType.kind === ApiItem_1.ApiItemKind.Interface ? ApiJsonGenerator._KIND_INTERFACE : | ||
''; | ||
@@ -57,0 +57,0 @@ var structureNode = { |
{ | ||
"name": "@microsoft/api-extractor", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Validatation, documentation, and auditing for the exported API of a TypeScript package", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.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
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
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
520239
6161