JsSyntheticModule Class

A Synthetic Module Record (https://tc39.es/ecma262/#sec-synthetic-module-records): a module whose exports are set by the host (e.g. a JSON module).

public sealed class JsSyntheticModule : JsModule
Inheritance
JsModule JsSyntheticModule

Properties

NameDescription
ExportNamesGets the names of the exports of the module.

Gets the names of the exports of the module.

public IReadOnlyList<string> ExportNames { get; }

Property value

IReadOnlyList<string>

Methods

NameDescription
SetExport(string, JsValue)Sets the value of an export (SetSyntheticModuleExport).

SetExport(string, JsValue)

JsSyntheticModule.cs

Sets the value of an export (SetSyntheticModuleExport).

public void SetExport(string name, JsValue value)

Parameters

name string
value JsValue

Exceptions

ArgumentException
The module does not export the name.