readPublicApiBarrel
Reads a package’s public API barrel: the modules it re-exports from and the names it forwards.
It is parsed on its own rather than through the ts-morph project, because the cache check needs the entry files before that project exists, and a cache hit must not pay for loading it.
Import:
import { readPublicApiBarrel } from '@mnaoumov/typescript-dev-toolkit/docs-site/api-doc-source-processing';Signature:
function readPublicApiBarrel(entryFile: string, sourceDirectory: string): PublicApiBarrelParameters:
| Parameter | Type | Description |
|---|---|---|
entryFile |
string | The barrel, e.g. <root>/src/index.ts. |
sourceDirectory |
string | The folder namespaces are relative to. |
Returns: PublicApiBarrel — The barrel.
Links to this page: