es-membrane

Home > ts-morph-structures > ExportManager

ExportManager class

This manages export declarations and specifiers, for including in a source file.

Signature:

export default class ExportManager 

Example

publicExports.addExports({
  pathToExportedModule: path.join(distDir, "source/toolbox/ExportManager.ts"),
  exportNames: ["ExportManager"],
  isDefaultExport: true,
  isType: false,
});
// ...
sourceFile.statements.push(...publicExports.getDeclarations());

Constructors

Constructor Modifiers Description
[(constructor)(absolutePathToExportFile)](/es-membrane/ts-morph-structures/api/ts-morph-structures.exportmanager._constructor_.html) Constructs a new instance of the `ExportManager` class

Properties

Property Modifiers Type Description
[absolutePathToExportFile](/es-membrane/ts-morph-structures/api/ts-morph-structures.exportmanager.absolutepathtoexportfile.html) `readonly` string Where the file will live on the file system.

Methods

Method Modifiers Description
[addExports(context)](/es-membrane/ts-morph-structures/api/ts-morph-structures.exportmanager.addexports.html)
[getDeclarations()](/es-membrane/ts-morph-structures/api/ts-morph-structures.exportmanager.getdeclarations.html) Get the export declarations, sorted by path to file, then internally by specified export values.