@microsoft/api-extractor
Version:
Validatation, documentation, and auditing for the exported API of a TypeScript package
404 lines (403 loc) • 12.5 kB
JSON
{
"kind": "package",
"summary": [
{
"kind": "textDocElement",
"value": "Here is some documentation for example2."
}
],
"remarks": [
{
"kind": "textDocElement",
"value": "These are additional remarks that may be too long for the summary. They should appear in the remarks of the json generated file for this package."
}
],
"exports": {
"IExternalPackageLookupInheritDoc": {
"kind": "interface",
"extends": "",
"implements": "",
"typeParameters": [],
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "this summary description has been added manually. It does not actually exist in the json documentation but it was added to demonstate the external packages loader is working."
}
],
"remarks": [],
"isBeta": false
},
"IncompleteTypeConstructor": {
"kind": "class",
"extends": "",
"implements": "",
"typeParameters": [],
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "This class tests a constructor with incomplete type information. The constructor should not appear in the API file, instead a warning comment should be printed about this class declaration. The constructor will not appear in the json file because the type information is incomplete."
}
],
"remarks": [],
"isBeta": false
},
"inheritDisplayMode": {
"kind": "enum",
"values": {},
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "DisplayMode indicates the mode in which a page and/or its contents (e.g. text and web parts) are dislayed."
}
],
"remarks": [
{
"kind": "textDocElement",
"value": "This is a test remarks message, it should be written to the test cases."
}
],
"isBeta": false
},
"inheritDisplayModeError": {
"kind": "enum",
"values": {},
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "DisplayMode indicates the mode in which a page and/or its contents (e.g. text and web parts) are dislayed."
}
],
"remarks": [
{
"kind": "textDocElement",
"value": "This is a test remarks message, it should be written to the test cases."
}
],
"isBeta": false
},
"inheritDisplayModeErrorDeprecated": {
"kind": "enum",
"values": {},
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "DisplayMode indicates the mode in which a page and/or its contents (e.g. text and web parts) are dislayed."
}
],
"remarks": [
{
"kind": "textDocElement",
"value": "This is a test remarks message, it should be written to the test cases."
}
],
"isBeta": false
},
"inheritDisplayModeNoErrorDeprecated": {
"kind": "enum",
"values": {},
"deprecatedMessage": [
{
"kind": "textDocElement",
"value": "- deprecated message must be present if the inherited Api item is deprecated. If not error is reported."
}
],
"summary": [
{
"kind": "textDocElement",
"value": "DisplayMode indicates the mode in which a page and/or its contents (e.g. text and web parts) are dislayed."
}
],
"remarks": [
{
"kind": "textDocElement",
"value": "This is a test remarks message, it should be written to the test cases."
}
],
"isBeta": false
},
"MyDocumentedClass": {
"kind": "class",
"extends": "",
"implements": "",
"typeParameters": [],
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "This is a class to test JsDoc parser and this is description that can span to multiple lines and we need to make sure we parse this block correctly. It can contain a"
},
{
"kind": "linkDocElement",
"referenceType": "href",
"targetUrl": "https://bing.com/",
"value": "bing home"
},
{
"kind": "textDocElement",
"value": ". This block is entirely valid and a correct documentation object should be built for this ApiItem."
}
],
"remarks": [],
"isBeta": false,
"members": {
"__constructor": {
"kind": "constructor",
"signature": "constructor();",
"parameters": {},
"deprecatedMessage": [],
"summary": [],
"remarks": []
},
"fieldWithBadTag": {
"kind": "property",
"isOptional": false,
"isReadOnly": false,
"isStatic": false,
"type": "string",
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "This doc has an invalid tag that should throw an error"
}
],
"remarks": [],
"isBeta": false
},
"fieldWithInvalidInlineTag": {
"kind": "property",
"isOptional": false,
"isReadOnly": false,
"isStatic": false,
"type": "string",
"deprecatedMessage": [
{
"kind": "textDocElement",
"value": "- see next version."
}
],
"summary": [
{
"kind": "textDocElement",
"value": "This doc has an unknown inline tag"
}
],
"remarks": [],
"isBeta": false
},
"fieldWithValidEscapedBraces": {
"kind": "property",
"isOptional": false,
"isReadOnly": false,
"isStatic": false,
"type": "string",
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "This doc has {curly braces} which is valid but the inline @link token is missing a pipe between the url and the display text"
},
{
"kind": "textDocElement",
"value": "The displayName is not allowed to have non word characters."
}
],
"remarks": [],
"isBeta": false
},
"linkTagMissingParam": {
"kind": "property",
"isOptional": false,
"isReadOnly": false,
"isStatic": false,
"type": "string",
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "This doc has too few params for link tag"
}
],
"remarks": [],
"isBeta": false
},
"methodWithTwoParams": {
"kind": "method",
"signature": "public methodWithTwoParams(param1: number, param2: string): string;",
"accessModifier": "public",
"isOptional": false,
"isStatic": false,
"returnValue": {
"type": "string",
"description": [
{
"kind": "textDocElement",
"value": "the result"
}
]
},
"parameters": {
"param1": {
"name": "param1",
"description": [
{
"kind": "textDocElement",
"value": "First parameter that can have a long and multi- line description with - hyphens -"
}
],
"isOptional": false,
"isSpread": false,
"type": "number"
},
"param2": {
"name": "param2",
"description": [
{
"kind": "textDocElement",
"value": "second parameter"
}
],
"isOptional": false,
"isSpread": false,
"type": "string"
}
},
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "This method has two params with docs."
}
],
"remarks": [],
"isBeta": false
},
"methodWithTypeLiterals": {
"kind": "method",
"signature": "public methodWithTypeLiterals:",
"accessModifier": "public",
"isOptional": false,
"isStatic": false,
"returnValue": {
"type": "{ \r\n name: string, \r\n obj: MyDocumentedClass \r\n }",
"description": [
{
"kind": "textDocElement",
"value": "the result"
}
]
},
"parameters": {
"param": {
"name": "param",
"description": [
{
"kind": "textDocElement",
"value": "First parameter"
}
],
"isOptional": false,
"isSpread": false,
"type": "{ x: number, y: number}"
}
},
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "This method uses type literals."
}
],
"remarks": [],
"isBeta": false
},
"methodWithTypeReferences": {
"kind": "method",
"signature": "public methodWithTypeReferences(param: MyDocumentedClass[]): MyDocumentedClass;",
"accessModifier": "public",
"isOptional": false,
"isStatic": false,
"returnValue": {
"type": "MyDocumentedClass",
"description": [
{
"kind": "textDocElement",
"value": "the result"
}
]
},
"parameters": {
"param": {
"name": "param",
"description": [
{
"kind": "textDocElement",
"value": "First parameter"
}
],
"isOptional": false,
"isSpread": false,
"type": "MyDocumentedClass[]"
}
},
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "This method references a custom type."
}
],
"remarks": [],
"isBeta": false
},
"propertyTypeLiteralIncompleteTypes": {
"kind": "property",
"isOptional": false,
"isReadOnly": false,
"isStatic": false,
"type": "{name, address: string}",
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "This type literal has incomplete type information. It should not be printed to the API file, instead a warning comment should be printed above the class declaration."
}
],
"remarks": [],
"isBeta": false
}
}
},
"packageLocatedButExportNotFound": {
"kind": "enum",
"values": {},
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "See documentation for @microsoft/sp-core-library:Display"
}
],
"remarks": [],
"isBeta": false
},
"TestMissingCommentStar": {
"kind": "enum",
"values": {},
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "Degenerate comment star missing here end of comment"
}
],
"remarks": [],
"isBeta": false
}
}
}