@microsoft/api-extractor-model 7.15.2 → 7.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -68
- package/dist/rollup.d.ts +16 -4
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/aedoc/AedocDefinitions.js.map +1 -1
- package/lib/aedoc/ReleaseTag.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/items/ApiDeclaredItem.js.map +1 -1
- package/lib/items/ApiDocumentedItem.js.map +1 -1
- package/lib/items/ApiItem.js.map +1 -1
- package/lib/items/ApiPropertyItem.js.map +1 -1
- package/lib/mixins/ApiItemContainerMixin.js.map +1 -1
- package/lib/mixins/ApiNameMixin.js.map +1 -1
- package/lib/mixins/ApiOptionalMixin.js.map +1 -1
- package/lib/mixins/ApiParameterListMixin.d.ts +1 -0
- package/lib/mixins/ApiParameterListMixin.d.ts.map +1 -1
- package/lib/mixins/ApiParameterListMixin.js +4 -1
- package/lib/mixins/ApiParameterListMixin.js.map +1 -1
- package/lib/mixins/ApiReleaseTagMixin.js.map +1 -1
- package/lib/mixins/ApiReturnTypeMixin.js.map +1 -1
- package/lib/mixins/ApiStaticMixin.js.map +1 -1
- package/lib/mixins/ApiTypeParameterListMixin.js.map +1 -1
- package/lib/mixins/Excerpt.js.map +1 -1
- package/lib/mixins/Mixin.js.map +1 -1
- package/lib/model/ApiCallSignature.js.map +1 -1
- package/lib/model/ApiClass.js.map +1 -1
- package/lib/model/ApiConstructSignature.js.map +1 -1
- package/lib/model/ApiConstructor.js.map +1 -1
- package/lib/model/ApiEntryPoint.js.map +1 -1
- package/lib/model/ApiEnum.js.map +1 -1
- package/lib/model/ApiEnumMember.js.map +1 -1
- package/lib/model/ApiFunction.js.map +1 -1
- package/lib/model/ApiIndexSignature.js.map +1 -1
- package/lib/model/ApiInterface.js.map +1 -1
- package/lib/model/ApiMethod.js.map +1 -1
- package/lib/model/ApiMethodSignature.js.map +1 -1
- package/lib/model/ApiModel.js.map +1 -1
- package/lib/model/ApiNamespace.js.map +1 -1
- package/lib/model/ApiPackage.js.map +1 -1
- package/lib/model/ApiProperty.js.map +1 -1
- package/lib/model/ApiPropertySignature.js.map +1 -1
- package/lib/model/ApiTypeAlias.js.map +1 -1
- package/lib/model/ApiVariable.js.map +1 -1
- package/lib/model/Deserializer.js.map +1 -1
- package/lib/model/DeserializerContext.d.ts +10 -4
- package/lib/model/DeserializerContext.d.ts.map +1 -1
- package/lib/model/DeserializerContext.js +10 -4
- package/lib/model/DeserializerContext.js.map +1 -1
- package/lib/model/HeritageType.js.map +1 -1
- package/lib/model/ModelReferenceResolver.js.map +1 -1
- package/lib/model/Parameter.d.ts +5 -0
- package/lib/model/Parameter.d.ts.map +1 -1
- package/lib/model/Parameter.js +1 -0
- package/lib/model/Parameter.js.map +1 -1
- package/lib/model/TypeParameter.js.map +1 -1
- package/package.json +31 -28
- package/CHANGELOG.json +0 -1553
- package/CHANGELOG.md +0 -648
package/lib/model/Parameter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../src/model/Parameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D,kEAA+D;
|
|
1
|
+
{"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../src/model/Parameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D,kEAA+D;AAe/D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,SAAS;IAkBpB,YAAmB,OAA0B;QAC3C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC;QACzD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAW,eAAe;QACxB,IAAI,IAAI,CAAC,OAAO,YAAY,qCAAiB,EAAE;YAC7C,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;gBAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACtE;SACF;IACH,CAAC;CACF;AAnCD,8BAmCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as tsdoc from '@microsoft/tsdoc';\n\nimport { ApiDocumentedItem } from '../items/ApiDocumentedItem';\nimport { Excerpt } from '../mixins/Excerpt';\nimport { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\n\n/**\n * Constructor options for {@link Parameter}.\n * @public\n */\nexport interface IParameterOptions {\n name: string;\n parameterTypeExcerpt: Excerpt;\n isOptional: boolean;\n parent: ApiParameterListMixin;\n}\n\n/**\n * Represents a named parameter for a function-like declaration.\n *\n * @remarks\n *\n * `Parameter` represents a TypeScript declaration such as `x: number` in this example:\n *\n * ```ts\n * export function add(x: number, y: number): number {\n * return x + y;\n * }\n * ```\n *\n * `Parameter` objects belong to the {@link (ApiParameterListMixin:interface).parameters} collection.\n *\n * @public\n */\nexport class Parameter {\n /**\n * An {@link Excerpt} that describes the type of the parameter.\n */\n public readonly parameterTypeExcerpt: Excerpt;\n\n /**\n * The parameter name.\n */\n public name: string;\n\n /**\n * Whether the parameter is optional.\n */\n public isOptional: boolean;\n\n private _parent: ApiParameterListMixin;\n\n public constructor(options: IParameterOptions) {\n this.name = options.name;\n this.parameterTypeExcerpt = options.parameterTypeExcerpt;\n this.isOptional = options.isOptional;\n this._parent = options.parent;\n }\n\n /**\n * Returns the `@param` documentation for this parameter, if present.\n */\n public get tsdocParamBlock(): tsdoc.DocParamBlock | undefined {\n if (this._parent instanceof ApiDocumentedItem) {\n if (this._parent.tsdocComment) {\n return this._parent.tsdocComment.params.tryGetBlockByName(this.name);\n }\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeParameter.js","sourceRoot":"","sources":["../../src/model/TypeParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D,kEAA+D;AAe/D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAa,aAAa;IAoCxB,YAAmB,OAA8B;QAC/C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACnD,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAW,mBAAmB;QAC5B,IAAI,IAAI,CAAC,OAAO,YAAY,qCAAiB,EAAE;YAC7C,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;gBAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC1E;SACF;IACH,CAAC;CACF;AArDD,sCAqDC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\
|
|
1
|
+
{"version":3,"file":"TypeParameter.js","sourceRoot":"","sources":["../../src/model/TypeParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D,kEAA+D;AAe/D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAa,aAAa;IAoCxB,YAAmB,OAA8B;QAC/C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACnD,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAW,mBAAmB;QAC5B,IAAI,IAAI,CAAC,OAAO,YAAY,qCAAiB,EAAE;YAC7C,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;gBAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC1E;SACF;IACH,CAAC;CACF;AArDD,sCAqDC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as tsdoc from '@microsoft/tsdoc';\n\nimport { ApiDocumentedItem } from '../items/ApiDocumentedItem';\nimport { Excerpt } from '../mixins/Excerpt';\nimport { ApiTypeParameterListMixin } from '../mixins/ApiTypeParameterListMixin';\n\n/**\n * Constructor options for {@link TypeParameter}.\n * @public\n */\nexport interface ITypeParameterOptions {\n name: string;\n constraintExcerpt: Excerpt;\n defaultTypeExcerpt: Excerpt;\n parent: ApiTypeParameterListMixin;\n}\n\n/**\n * Represents a named type parameter for a generic declaration.\n *\n * @remarks\n *\n * `TypeParameter` represents a TypeScript declaration such as `T` in this example:\n *\n * ```ts\n * interface IIdentifier {\n * getCode(): string;\n * }\n *\n * class BarCode implements IIdentifier {\n * private _value: number;\n * public getCode(): string { return this._value.toString(); }\n * }\n *\n * class Book<TIdentifier extends IIdentifier = BarCode> {\n * public identifier: TIdentifier;\n * }\n * ```\n *\n * `TypeParameter` objects belong to the {@link (ApiTypeParameterListMixin:interface).typeParameters} collection.\n *\n * @public\n */\nexport class TypeParameter {\n /**\n * An {@link Excerpt} that describes the base constraint of the type parameter.\n *\n * @remarks\n * In the example below, the `constraintExcerpt` would correspond to the `IIdentifier` subexpression:\n *\n * ```ts\n * class Book<TIdentifier extends IIdentifier = BarCode> {\n * public identifier: TIdentifier;\n * }\n * ```\n */\n public readonly constraintExcerpt: Excerpt;\n\n /**\n * An {@link Excerpt} that describes the default type of the type parameter.\n *\n * @remarks\n * In the example below, the `defaultTypeExcerpt` would correspond to the `BarCode` subexpression:\n *\n * ```ts\n * class Book<TIdentifier extends IIdentifier = BarCode> {\n * public identifier: TIdentifier;\n * }\n * ```\n */\n public readonly defaultTypeExcerpt: Excerpt;\n\n /**\n * The parameter name.\n */\n public name: string;\n\n private _parent: ApiTypeParameterListMixin;\n\n public constructor(options: ITypeParameterOptions) {\n this.name = options.name;\n this.constraintExcerpt = options.constraintExcerpt;\n this.defaultTypeExcerpt = options.defaultTypeExcerpt;\n this._parent = options.parent;\n }\n\n /**\n * Returns the `@typeParam` documentation for this parameter, if present.\n */\n public get tsdocTypeParamBlock(): tsdoc.DocParamBlock | undefined {\n if (this._parent instanceof ApiDocumentedItem) {\n if (this._parent.tsdocComment) {\n return this._parent.tsdocComment.typeParams.tryGetBlockByName(this.name);\n }\n }\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
2
|
+
"name": "@microsoft/api-extractor-model",
|
|
3
|
+
"version": "7.16.0",
|
|
4
|
+
"description": "A helper library for loading and saving the .api.json files created by API Extractor",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/microsoft/rushstack.git",
|
|
8
|
+
"directory": "apps/api-extractor-model"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://api-extractor.com",
|
|
11
|
+
"main": "lib/index.js",
|
|
12
|
+
"typings": "dist/rollup.d.ts",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@microsoft/tsdoc": "0.13.2",
|
|
16
|
+
"@microsoft/tsdoc-config": "~0.15.2",
|
|
17
|
+
"@rushstack/node-core-library": "3.45.1"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@rushstack/eslint-config": "2.5.2",
|
|
21
|
+
"@rushstack/heft": "0.44.2",
|
|
22
|
+
"@rushstack/heft-node-rig": "1.7.1",
|
|
23
|
+
"@types/heft-jest": "1.0.1",
|
|
24
|
+
"@types/node": "12.20.24"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "heft build --clean",
|
|
28
|
+
"_phase:build": "heft build --clean",
|
|
29
|
+
"_phase:test": "heft test --no-build"
|
|
30
|
+
},
|
|
31
|
+
"readme": "# @microsoft/api-extractor-model\n\nUse this library to read and write *.api.json files as defined by the [API Extractor](https://api-extractor.com/) tool.\nThese files are used to generate a documentation website for your TypeScript package. The files store the\nAPI signatures and doc comments that were extracted from your package.\n\nAPI documentation for this package: https://rushstack.io/pages/api/api-extractor-model/\n\n## Example Usage\n\nThe following code sample shows how to load `example.api.json`, which would be generated by API Extractor\nwhen it analyzes a hypothetical NPM package called `example`:\n\n```ts\nimport { ApiModel, ApiPackage } from '@microsoft/api-extractor-model';\n\nconst apiModel: ApiModel = new ApiModel();\nconst apiPackage: ApiPackage = apiModel.loadPackage('example.api.json');\n\nfor (const member of apiPackage.members) {\n console.log(member.displayName);\n}\n```\n\nThe `ApiModel` is acts as a container for various packages that are loaded and operated on as a group.\nFor example, a documentation tool may need to resolve `@link` references across different packages.\nIn this case we would load the various packages into the `ApiModel`, and then use\nthe `ApiModel.resolveDeclarationReference()` to resolve the `@link` targets.\n\nThe data structure forms a tree of various classes that start with the `Api` prefix. The nesting hierarchy\nmight look like this:\n\n```\n- ApiModel\n - ApiPackage\n - ApiEntryPoint\n - ApiClass\n - ApiMethod\n - ApiProperty\n - ApiEnum\n - ApiEnumMember\n - ApiInterface\n - ApiMethodSignature\n - ApiPropertySignature\n - ApiNamespace\n - (ApiClass, ApiEnum, ApiInterface, ...)\n```\n\nYou can use the `ApiItem.members` property to traverse this tree.\n\nNote that the non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use\nTypeScript \"mixin\" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various\nfeatures that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class\nto extend more than one base class). The \"mixin\" is a TypeScript merged declaration with three components:\nthe function that generates a subclass, an interface that describes the members of the subclass, and\na namespace containing static members of the class.\n\n> For a complete project that uses these APIs to generate an API reference web site,\n> see the [@microsoft/api-documenter](https://www.npmjs.com/package/@microsoft/api-documenter) source code.\n\n## Links\n\n- [CHANGELOG.md](\n https://github.com/microsoft/rushstack/blob/master/apps/api-extractor-model/CHANGELOG.md) - Find\n out what's new in the latest version\n- [API Reference](https://rushstack.io/pages/api/api-extractor-model/)\n\nAPI Extractor is part of the [Rush Stack](https://rushstack.io/) family of projects.\n"
|
|
32
|
+
}
|