Skip to main content

CreateDefaultExportSyntheticModule

Function CreateDefaultExportSyntheticModule 

Source
pub unsafe extern "C" fn CreateDefaultExportSyntheticModule(
    cx: *mut JSContext,
    defaultExport: Handle<Value>,
) -> *mut JSObject
Expand description

Create a synthetic module record that exports a single value as its default export. The caller is responsible for providing the already-constructed value to export.

This matches the ECMAScript specification’s definition: https://tc39.es/ecma262/#sec-create-default-export-synthetic-module