---
lang: en
title: 'API docs: tsdocs'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/tsdocs
permalink: /doc/en/lb4/apidocs.tsdocs.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/tsdocs](./tsdocs.md)

## tsdocs package

The `@loopback/tsdocs` package is an internal module to generate [tsdoc](https://github.com/Microsoft/tsdoc) based API docs for `@loopback/*` packages within [loopback-next](https://github.com/strongloop/loopback-next) monorepo managed by [Lerna](https://github.com/lerna/lerna)<!-- -->.

## Remarks

It's built on top of [Microsoft API Extractor](https://api-extractor.com)<!-- -->:

- [api-extractor](https://github.com/Microsoft/web-build-tools/tree/master/apps/api-extractor) - [api-documenter](https://github.com/Microsoft/web-build-tools/tree/master/apps/api-documenter)

## Functions

|  Function | Description |
|  --- | --- |
|  [getPackages(rootDir)](./tsdocs.getpackages.md) | Get lerna packages and sorted them by location |
|  [getPackagesWithTsDocs(rootDir)](./tsdocs.getpackageswithtsdocs.md) | Get an array of lerna-managed TypeScript packages to generate tsdocs |
|  [getUnscopedPackageName(name)](./tsdocs.getunscopedpackagename.md) | Get un-scoped package name |
|  [runExtractorForMonorepo(options)](./tsdocs.runextractorformonorepo.md) | Run api-extractor for a lerna-managed monrepo |
|  [runExtractorForPackage(pkgDir, options)](./tsdocs.runextractorforpackage.md) |  |
|  [shouldGenerateTsDocs(pkg)](./tsdocs.shouldgeneratetsdocs.md) | Check if a package should be processed for tsdocs |
|  [updateApiDocs(options)](./tsdocs.updateapidocs.md) | Update markdown files generated by api-documenter to prepend Jekyll metadata and generate <code>apidocs/index.md</code>. |

## Interfaces

|  Interface | Description |
|  --- | --- |
|  [ApiDocsOptions](./tsdocs.apidocsoptions.md) | Options for api docs |
|  [ExtractorOptions](./tsdocs.extractoroptions.md) | Options to run api-extractor against the lerna repo |
|  [LernaPackage](./tsdocs.lernapackage.md) | TypeScript definition for [Lerna Package](https://github.com/lerna/lerna/blob/master/core/package/index.js) |

## Variables

|  Variable | Description |
|  --- | --- |
|  [DEFAULT\_APIDOCS\_EXTRACTION\_PATH](./tsdocs.default_apidocs_extraction_path.md) | Default path as the output directory for extracted api reports and models |
|  [DEFAULT\_APIDOCS\_GENERATION\_PATH](./tsdocs.default_apidocs_generation_path.md) | Default path for apidocs to be generated for loopback.io site |
|  [typeScriptPath](./tsdocs.typescriptpath.md) | Export the TypeScript path from <code>@loopback/build</code> |


