@loopback/docs
Version:
Documentation for LoopBack 4
1,165 lines (1,164 loc) • 35.1 kB
JSON
{
"metadata": {
"toolPackage": "@microsoft/api-extractor",
"toolVersion": "7.2.1",
"schemaVersion": 1001,
"oldestForwardsCompatibleVersion": 1001
},
"kind": "Package",
"canonicalReference": "@loopback/tsdocs",
"docComment": "/**\n * The `@loopback/tsdocs` package is an internal module to generate {@link https://github.com/Microsoft/tsdoc | tsdoc} based API docs for `@loopback/*` packages within {@link https://github.com/strongloop/loopback-next | loopback-next} monorepo managed by {@link https://github.com/lerna/lerna | lerna}.\n *\n * It's built on top of {@link https://api-extractor.com | MicroSoft AP Extractor}:\n *\n * - {@link https://github.com/Microsoft/web-build-tools/tree/master/apps/api-extractor | api-extractor} - {@link https://github.com/Microsoft/web-build-tools/tree/master/apps/api-documenter | api-documenter}\n *\n * @packageDocumentation\n */\n",
"name": "@loopback/tsdocs",
"members": [
{
"kind": "EntryPoint",
"canonicalReference": "",
"name": "",
"members": [
{
"kind": "Interface",
"canonicalReference": "(ApiDocsOptions:interface)",
"docComment": "/**\n * Options for api docs\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface "
},
{
"kind": "Reference",
"text": "ApiDocsOptions"
},
{
"kind": "Content",
"text": " "
}
],
"releaseTag": "Public",
"name": "ApiDocsOptions",
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "apiDocsExtractionPath",
"docComment": "/**\n * Path to tsdocs reports/models\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "apiDocsExtractionPath"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "apiDocsExtractionPath",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "apiDocsGenerationPath",
"docComment": "/**\n * Path to target directory to generate apidocs\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "apiDocsGenerationPath"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "apiDocsGenerationPath",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "dryRun",
"docComment": "/**\n * To have a dry-run without generating api reports/doc models\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "dryRun"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "boolean"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "dryRun",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "generateDefaultPackageDoc",
"docComment": "/**\n * A flag to generate default package documentation\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "generateDefaultPackageDoc"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "boolean"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "generateDefaultPackageDoc",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "rootDir",
"docComment": "/**\n * Root directory for the lerna-managed monorepo, default to current dir\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "rootDir"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "rootDir",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "silent",
"docComment": "/**\n * If `true`, do not print messages to console\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "silent"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "boolean"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "silent",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
}
],
"extendsTokenRanges": []
},
{
"kind": "Interface",
"canonicalReference": "(ExtractorOptions:interface)",
"docComment": "/**\n * Options to run api-extractor against the lerna repo\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface "
},
{
"kind": "Reference",
"text": "ExtractorOptions"
},
{
"kind": "Content",
"text": " extends "
},
{
"kind": "Reference",
"text": "ApiDocsOptions"
},
{
"kind": "Content",
"text": " "
}
],
"releaseTag": "Public",
"name": "ExtractorOptions",
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "apiReportEnabled",
"docComment": "/**\n * A flag to control if `apiReport` should be enabled\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "apiReportEnabled"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "boolean"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "apiReportEnabled",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "config",
"docComment": "/**\n * Configuration for api-extractor\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "config"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Reference",
"text": "IConfigFile"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "config",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "mainEntryPointFilePath",
"docComment": "/**\n * mainEntryPointFilePath\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "mainEntryPointFilePath"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "mainEntryPointFilePath",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "tsconfigFilePath",
"docComment": "/**\n * Path for tsconfig\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "tsconfigFilePath"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "tsconfigFilePath",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "typescriptCompilerFolder",
"docComment": "/**\n * Custom TypeScript compiler dir\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "typescriptCompilerFolder"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "typescriptCompilerFolder",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
}
],
"extendsTokenRanges": [
{
"startIndex": 3,
"endIndex": 5
}
]
},
{
"kind": "Function",
"canonicalReference": "(fixConstructorName:0)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function "
},
{
"kind": "Reference",
"text": "fixConstructorName"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "name"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 8
},
"releaseTag": "Public",
"overloadIndex": 0,
"parameters": [
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
}
}
],
"name": "fixConstructorName"
},
{
"kind": "Function",
"canonicalReference": "(getPackages:0)",
"docComment": "/**\n * Get lerna packages and sorted them by location\n *\n * @param rootDir - Root directory to find lerna.json\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function "
},
{
"kind": "Reference",
"text": "getPackages"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "rootDir"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Promise"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "LernaPackage"
},
{
"kind": "Content",
"text": "[]>"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 11
},
"releaseTag": "Public",
"overloadIndex": 0,
"parameters": [
{
"parameterName": "rootDir",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
}
}
],
"name": "getPackages"
},
{
"kind": "Function",
"canonicalReference": "(getPackagesWithTsDocs:0)",
"docComment": "/**\n * Get an array of lerna-managed TypeScript packages to generate tsdocs\n *\n * @param rootDir - Root directory to find the monorepo\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function "
},
{
"kind": "Reference",
"text": "getPackagesWithTsDocs"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "rootDir"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Promise"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "LernaPackage"
},
{
"kind": "Content",
"text": "[]>"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 11
},
"releaseTag": "Public",
"overloadIndex": 0,
"parameters": [
{
"parameterName": "rootDir",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
}
}
],
"name": "getPackagesWithTsDocs"
},
{
"kind": "Function",
"canonicalReference": "(getUnscopedPackageName:0)",
"docComment": "/**\n * Get un-scoped package name\n *\n * @param name - Name of the npm package\n *\n * @example\n *\n * - '@loopback/context' => 'context' - 'express' => 'express'\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function "
},
{
"kind": "Reference",
"text": "getUnscopedPackageName"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "name"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 8
},
"releaseTag": "Public",
"overloadIndex": 0,
"parameters": [
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
}
}
],
"name": "getUnscopedPackageName"
},
{
"kind": "Interface",
"canonicalReference": "(LernaPackage:interface)",
"docComment": "/**\n * TypeScript definition for {@link https://github.com/lerna/lerna/blob/master/core/package/index.js | Lerna Package)\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface "
},
{
"kind": "Reference",
"text": "LernaPackage"
},
{
"kind": "Content",
"text": " "
}
],
"releaseTag": "Public",
"name": "LernaPackage",
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "location",
"docComment": "/**\n * Location of the package\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "location"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "location",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "manifestLocation",
"docComment": "/**\n * Location of `package.json`\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "manifestLocation"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "manifestLocation",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "name",
"docComment": "/**\n * Package name\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "name"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "name",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "private",
"docComment": "/**\n * Is it a private package?\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "private"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "boolean"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "private",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "rootPath",
"docComment": "/**\n * Root directory of the monorepo\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "rootPath"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "rootPath",
"propertyTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
}
],
"extendsTokenRanges": []
},
{
"kind": "Function",
"canonicalReference": "(runExtractorForMonorepo:0)",
"docComment": "/**\n * Run api-extractor for a lerna-managed monrepo\n *\n * @remarks\n *\n * The function performs the following steps: 1. Discover packages with tsdocs from the monorepo 2. Iterate through each package to run `api-extractor`\n *\n * @param options - Options for running api-extractor\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function "
},
{
"kind": "Reference",
"text": "runExtractorForMonorepo"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "options"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Reference",
"text": "ExtractorOptions"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Promise"
},
{
"kind": "Content",
"text": "<void>"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 9
},
"releaseTag": "Public",
"overloadIndex": 0,
"parameters": [
{
"parameterName": "options",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
}
}
],
"name": "runExtractorForMonorepo"
},
{
"kind": "Function",
"canonicalReference": "(runExtractorForPackage:0)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function "
},
{
"kind": "Reference",
"text": "runExtractorForPackage"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "pkgDir"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", "
},
{
"kind": "Reference",
"text": "options"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Reference",
"text": "ExtractorOptions"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "void"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 11,
"endIndex": 12
},
"releaseTag": "Public",
"overloadIndex": 0,
"parameters": [
{
"parameterName": "pkgDir",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
}
},
{
"parameterName": "options",
"parameterTypeTokenRange": {
"startIndex": 9,
"endIndex": 10
}
}
],
"name": "runExtractorForPackage"
},
{
"kind": "Function",
"canonicalReference": "(shouldGenerateTsDocs:0)",
"docComment": "/**\n * Check if a package should be processed for tsdocs\n *\n * @param pkg - Lerna package\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function "
},
{
"kind": "Reference",
"text": "shouldGenerateTsDocs"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "pkg"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Reference",
"text": "LernaPackage"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "boolean"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 8
},
"releaseTag": "Public",
"overloadIndex": 0,
"parameters": [
{
"parameterName": "pkg",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
}
}
],
"name": "shouldGenerateTsDocs"
},
{
"kind": "Function",
"canonicalReference": "(updateApiDocs:0)",
"docComment": "/**\n * Update markdown files generated by api-documenter to prepend Jekyll metadata and generate `apidocs/index.md`.\n *\n * @param options - Options for api docs\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function "
},
{
"kind": "Reference",
"text": "updateApiDocs"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "options"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Reference",
"text": "ApiDocsOptions"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Promise"
},
{
"kind": "Content",
"text": "<void>"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 9
},
"releaseTag": "Public",
"overloadIndex": 0,
"parameters": [
{
"parameterName": "options",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
}
}
],
"name": "updateApiDocs"
},
{
"kind": "Variable",
"canonicalReference": "DEFAULT_APIDOCS_EXTRACTION_PATH",
"docComment": "/**\n * Default path as the output directory for extracted api reports and models\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "DEFAULT_APIDOCS_EXTRACTION_PATH"
},
{
"kind": "Content",
"text": " = \"docs/apidocs\""
}
],
"releaseTag": "Public",
"name": "DEFAULT_APIDOCS_EXTRACTION_PATH",
"variableTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
},
{
"kind": "Variable",
"canonicalReference": "DEFAULT_APIDOCS_GENERATION_PATH",
"docComment": "/**\n * Default path for apidocs to be generated for loopback.io site\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "DEFAULT_APIDOCS_GENERATION_PATH"
},
{
"kind": "Content",
"text": " = \"docs/site/apidocs\""
}
],
"releaseTag": "Public",
"name": "DEFAULT_APIDOCS_GENERATION_PATH",
"variableTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
},
{
"kind": "Variable",
"canonicalReference": "typeScriptPath",
"docComment": "/**\n * Export the TypeScript path from `@loopback/build`\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "typeScriptPath"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "any"
}
],
"releaseTag": "Public",
"name": "typeScriptPath",
"variableTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
}
}
]
}
]
}