Home > ts-morph-structures > ExportManager
This manages export declarations and specifiers, for including in a source file.
Signature:
export default class ExportManager
publicExports.addExports({
pathToExportedModule: path.join(distDir, "source/toolbox/ExportManager.ts"),
exportNames: ["ExportManager"],
isDefaultExport: true,
isType: false,
});
// ...
sourceFile.statements.push(...publicExports.getDeclarations());
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(absolutePathToExportFile) | Constructs a new instance of the ExportManager class |
| Property | Modifiers | Type | Description |
|---|---|---|---|
| absolutePathToExportFile | readonly |
string | Where the file will live on the file system. |
| Method | Modifiers | Description |
|---|---|---|
| addExports(context) | ||
| getDeclarations() | Get the export declarations, sorted by path to file, then internally by specified export values. |