Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents the processor for transpiled JavaScript files.

It optimizes the script blocks, allowing statements with the same declaration to be merged.

First, the processor will look for TypeScript transpiled IIFE blocks:

var myModule;
(function (myModule) {[body0]})(myModule || (myModule = {}));
(function (myModule) {[body1]})(myModule || (myModule = {}));
...
(function (myModule) {[bodyN]})(myModule || (myModule = {}));

Then, using merge it will optmize all blocks with the same module name:

var myModule;
(function (myModule) {[body0;body1;...;bodyN]})(myModule || (myModule = {}));

Hierarchy

  • JsProcessor

Implements

Index

Constructors

Accessors

Methods

Constructors

constructor

  • Initializes a new instance of the JsProcessor class, using the input file as content source for the merging.

    Parameters

    • file: File | string

      A string with the file contents or a File object.

    • Optional context: MergeContext

      Context object used throughout mergings.

    Returns JsProcessor

Accessors

sourceMapFile

sourceMapFile:

Gets the source map file generated by the merging.

Methods

merge

  • merge(): null | File
  • Merges the input JavaScript file of this object, returning the merged file as result.

    Returns null | File

    A file object, containing the results of the merging and all attributes pertaining to it.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc