Initializes a new instance of the DtsProcessor class, using the input file as content source for the merging.
A string with the file contents or a File object.
Context object used throughout mergings.
Merges the input declaration file of this object, returning the merged file as result.
A file object, containing the results of the merging and all attributes pertaining to it, or null if the file contains no mergeable declarations.
Generated using TypeDoc
Represents the processor for transpiled declaration (d.ts) files.
It optimizes the namespace declaration, exporting all contents of a same namespace within a single block.
First, it will look for TypeScript declaration namespaces:
namespace myModule { export declare class FromFile1 {} } namespace myModule { export declare interface FromFile2 {} } // ... namespace myModule { export declare class FromFileN {} }
Then, using merge it will optmize all blocks with the same module name:
namespace myModule { export declare class FromFile1 {} export declare interface FromFile2 {} // ... export declare class FromFileN {} }