ModuleSource
in package
ModuleSource represents an ES6 module, including the source code and type. An ModuleSource should be returned from your module loader passed to JsRuntime's RuntimeOptions::module_loader property.
Table of Contents
Properties
- $code : string
- The module's source code.
- $module_type : string
- The module type, can be "javascript" or "json".
- $module_url_found : string
- The resolved module URL, after things like 301 redrects etc.
- $module_url_specified : string
- The specified module URL of the import.
Methods
- __construct() : mixed
Properties
$code
The module's source code.
public
string
$code
$module_type
The module type, can be "javascript" or "json".
public
string
$module_type
$module_url_found
The resolved module URL, after things like 301 redrects etc.
public
string
$module_url_found
$module_url_specified
The specified module URL of the import.
public
string
$module_url_specified
Methods
__construct()
public
__construct(string $code, string $module_type, string $module_url_specified, string $module_url_found) : mixed
Parameters
- $code : string
- $module_type : string
- $module_url_specified : string
- $module_url_found : string