@microsoft/api-extractor
Version:
Validate, document, and review the exported API for a TypeScript library
22 lines (21 loc) • 1.14 kB
TypeScript
import { IAstItemOptions } from './AstItem';
import AstModule from './AstModule';
/**
* This class is part of the AstItem abstract syntax tree. It represents exports of
* a namespace, the exports can be module variable constants of type "string", "boolean" or "number".
* An AstNamespace is defined using TypeScript's "namespace" keyword.
*
* @remarks A note about terminology:
* - EcmaScript "namespace modules" are not conventional namespaces; their semantics are
* more like static classes in C# or Java.
* - API Extractor's support for namespaces is currently limited to representing tables of
* constants, and has a benefit of enabling WebPack to avoid bundling unused values.
* - We currently still recommend to use static classes for utility libraries, since this
* provides getters/setters, public/private, and some other structure missing from namespaces.
*/
export default class AstNamespace extends AstModule {
private _exportedNormalizedSymbols;
constructor(options: IAstItemOptions);
private _processConservativeMembers(exportSymbols);
private _processPermissiveMembers(exportSymbols);
}