Hierarchy

  • RuntimeTemplate

Constructors

Properties

compilation: Compilation
contentHashReplacement: string
globalObject: string
outputOptions: OutputNormalized
requestShortener: RequestShortener

Methods

  • Parameters

    Returns string

  • Parameters

    • __namedParameters: {
          block: AsyncDependenciesBlock;
          chunkGraph: ChunkGraph;
          request?: string;
          runtimeRequirements: Set<string>;
      }
      • block: AsyncDependenciesBlock

        the async block

      • chunkGraph: ChunkGraph

        the chunk graph

      • Optional request?: string

        request string used originally

      • runtimeRequirements: Set<string>

        if set, will be filled with runtime requirements

    Returns string

  • Parameters

    • Optional args: any
    • Optional body: any

    Returns string

  • Parameters

    • __namedParameters: {
          block: AsyncDependenciesBlock;
          chunkGraph: ChunkGraph;
          message: string;
          runtimeRequirements: Set<string>;
      }
      • block: AsyncDependenciesBlock

        the async block

      • chunkGraph: ChunkGraph

        the chunk graph

      • message: string

        the message

      • runtimeRequirements: Set<string>

        if set, will be filled with runtime requirements

    Returns string

  • Add a comment

    Parameters

    • __namedParameters: {
          chunkName?: string;
          chunkReason?: string;
          exportName?: string;
          message?: string;
          request?: string;
      }
      • Optional chunkName?: string

        name of the chunk referenced

      • Optional chunkReason?: string

        reason information of the chunk

      • Optional exportName?: string

        name of the export

      • Optional message?: string

        additional message

      • Optional request?: string

        request string used originally

    Returns string

  • Parameters

    • Rest ...args: (string | {
          expr: string;
      })[]

    Returns string

  • Parameters

    • __namedParameters: {
          exportsArgument: string;
          runtimeRequirements: Set<string>;
      }
      • exportsArgument: string

        the name of the exports object

      • runtimeRequirements: Set<string>

        if set, will be filled with runtime requirements

    Returns string

  • Parameters

    • Optional items: any
    • Optional value: any

    Returns string

  • Parameters

    • Optional items: any
    • Optional value: any

    Returns string

  • Returns "x => {}" | "function() {}"

  • Parameters

    • __namedParameters: {
          asiSafe?: boolean;
          callContext: boolean;
          defaultInterop: boolean;
          exportName: string | string[];
          importVar: string;
          initFragments: InitFragment<any>[];
          isCall: boolean;
          module: Module;
          moduleGraph: ModuleGraph;
          originModule: Module;
          request: string;
          runtime: RuntimeSpec;
          runtimeRequirements: Set<string>;
      }
      • Optional asiSafe?: boolean

        true, if location is safe for ASI, a bracket can be emitted

      • callContext: boolean

        when false, call context will not be preserved

      • defaultInterop: boolean

        when true and accessing the default exports, interop code will be generated

      • exportName: string | string[]

        the export name

      • importVar: string

        the identifier name of the import variable

      • initFragments: InitFragment<any>[]

        init fragments will be added here

      • isCall: boolean

        true, if expression will be called

      • module: Module

        the module

      • moduleGraph: ModuleGraph

        the module graph

      • originModule: Module

        the origin module

      • request: string

        the request

      • runtime: RuntimeSpec

        runtime for which this code will be generated

      • runtimeRequirements: Set<string>

        if set, will be filled with runtime requirements

    Returns string

  • Parameters

    • Optional expression: any
    • Optional args: string

    Returns string

  • Parameters

    • Optional variable: any
    • Optional array: any
    • Optional body: any

    Returns string

  • Parameters

    • Optional args: any
    • Optional body: any

    Returns string

  • Parameters

    • __namedParameters: {
          chunkGraph: ChunkGraph;
          importVar: string;
          module: Module;
          originModule: Module;
          request: string;
          runtimeRequirements: Set<string>;
          update?: boolean;
          weak?: boolean;
      }
      • chunkGraph: ChunkGraph

        the chunk graph

      • importVar: string

        name of the import variable

      • module: Module

        the module

      • originModule: Module

        module in which the statement is emitted

      • request: string

        the request that should be printed as comment

      • runtimeRequirements: Set<string>

        if set, will be filled with runtime requirements

      • Optional update?: boolean

        whether a new variable should be created or the existing one updated

      • Optional weak?: boolean

        true, if this is a weak dependency

    Returns [string, string]

  • Returns undefined | boolean

  • Returns undefined | boolean

  • Parameters

    • __namedParameters: {
          request?: string;
      }
      • Optional request?: string

        request string used originally

    Returns string

  • Parameters

    • __namedParameters: {
          request?: string;
      }
      • Optional request?: string

        request string used originally

    Returns string

  • Parameters

    • __namedParameters: {
          request?: string;
      }
      • Optional request?: string

        request string used originally

    Returns string

  • Parameters

    • __namedParameters: {
          chunkGraph: ChunkGraph;
          module: Module;
          request: string;
          runtimeRequirements: Set<string>;
          weak?: boolean;
      }
      • chunkGraph: ChunkGraph

        the chunk graph

      • module: Module

        the module

      • request: string

        the request that should be printed as comment

      • runtimeRequirements: Set<string>

        if set, will be filled with runtime requirements

      • Optional weak?: boolean

        if the dependency is weak (will create a nice error message)

    Returns string

  • Parameters

    • __namedParameters: {
          chunkGraph: ChunkGraph;
          module: Module;
          request: string;
          weak?: boolean;
      }
      • chunkGraph: ChunkGraph

        the chunk graph

      • module: Module

        the module

      • request: string

        the request that should be printed as comment

      • Optional weak?: boolean

        if the dependency is weak (will create a nice error message)

    Returns string

  • Parameters

    • __namedParameters: {
          chunkGraph: ChunkGraph;
          module: Module;
          request: string;
          runtimeRequirements: Set<string>;
          strict?: boolean;
          weak?: boolean;
      }
      • chunkGraph: ChunkGraph

        the chunk graph

      • module: Module

        the module

      • request: string

        the request that should be printed as comment

      • runtimeRequirements: Set<string>

        if set, will be filled with runtime requirements

      • Optional strict?: boolean

        if the current module is in strict esm mode

      • Optional weak?: boolean

        if the dependency is weak (will create a nice error message)

    Returns string

  • Parameters

    • __namedParameters: {
          block?: AsyncDependenciesBlock;
          chunkGraph: ChunkGraph;
          message: string;
          module: Module;
          request: string;
          runtimeRequirements: Set<string>;
          strict?: boolean;
          weak?: boolean;
      }
      • Optional block?: AsyncDependenciesBlock

        the current dependencies block

      • chunkGraph: ChunkGraph

        the chunk graph

      • message: string

        a message for the comment

      • module: Module

        the module

      • request: string

        the request that should be printed as comment

      • runtimeRequirements: Set<string>

        if set, will be filled with runtime requirements

      • Optional strict?: boolean

        if the current module is in strict esm mode

      • Optional weak?: boolean

        if the dependency is weak (will create a nice error message)

    Returns string

  • Parameters

    • __namedParameters: {
          chunkGraph: ChunkGraph;
          module: Module;
          request: string;
          runtimeRequirements: Set<string>;
          weak?: boolean;
      }
      • chunkGraph: ChunkGraph

        the chunk graph

      • module: Module

        the module

      • request: string

        the request that should be printed as comment

      • runtimeRequirements: Set<string>

        if set, will be filled with runtime requirements

      • Optional weak?: boolean

        if the dependency is weak (will create a nice error message)

    Returns string

  • Parameters

    • Optional returnValue: any
    • Optional args: string

    Returns string

  • Parameters

    • __namedParameters: {
          chunkGraph: ChunkGraph;
          runtime?: RuntimeSpec;
          runtimeCondition?: string | boolean | SortableSet<string>;
          runtimeRequirements: Set<string>;
      }
      • chunkGraph: ChunkGraph

        the chunk graph

      • Optional runtime?: RuntimeSpec

        runtime for which this code will be generated

      • Optional runtimeCondition?: string | boolean | SortableSet<string>

        only execute the statement in some runtimes

      • runtimeRequirements: Set<string>

        if set, will be filled with runtime requirements

    Returns string

  • Returns undefined | boolean

  • Returns undefined | boolean

  • Returns undefined | boolean

  • Returns undefined | boolean

  • Returns undefined | boolean

  • Returns undefined | boolean

  • Returns undefined | boolean

  • Returns undefined | boolean

  • Returns undefined | boolean

  • Parameters

    • __namedParameters: {
          chunkGraph: ChunkGraph;
          dependency: Dependency;
          request?: string;
          runtimeRequirements: Set<string>;
      }
      • chunkGraph: ChunkGraph

        the chunk graph

      • dependency: Dependency

        the dependency

      • Optional request?: string

        request string used originally

      • runtimeRequirements: Set<string>

        if set, will be filled with runtime requirements

    Returns string

  • Parameters

    • __namedParameters: {
          request?: string;
      }
      • Optional request?: string

        request string used originally

    Returns string

  • Parameters

    • __namedParameters: {
          request?: string;
      }
      • Optional request?: string

        request string used originally

    Returns string

  • Parameters

    • __namedParameters: {
          chunkGraph: ChunkGraph;
          idExpr?: string;
          module: Module;
          request: string;
          type: "promise" | "expression" | "statements";
      }
      • chunkGraph: ChunkGraph

        the chunk graph

      • Optional idExpr?: string

        expression to use as id expression

      • module: Module

        the module

      • request: string

        the request that should be printed as comment

      • type: "promise" | "expression" | "statements"

        which kind of code should be returned

    Returns string

Generated using TypeDoc