JsModuleBinding Class
A binding exported by a module (a ResolvedBinding Record, https://tc39.es/ecma262/#resolvedbinding-record): a binding of the environment of JsModuleBinding.Module, or its namespace object. Returned by JsHostDefinedModule.GetImport.
public sealed class JsModuleBindingProperties
| Name | Description |
|---|---|
| BindingName | Gets the name of the binding in the environment of JsModuleBinding.Module, or null when the binding is the namespace object of the module. |
| IsNamespace | Gets whether the binding is a namespace object (export * as ns from). |
| Module | Gets the module whose environment holds the binding (the module that declares it, after the re-exports). |
BindingName
JsModuleBinding.csGets the name of the binding in the environment of JsModuleBinding.Module, or null when the binding is the namespace object of the module.
public string? BindingName { get; }Property value
IsNamespace
JsModuleBinding.csModule
JsModuleBinding.csMethods
| Name | Description |
|---|---|
| GetValue() | Reads the value of the binding (GetBindingValue). |
| TryGetValue(JsValue) | Reads the value of the binding (GetBindingValue). Returns false when the binding is not initialized yet (e.g. a let or a const of a module that is not evaluated, the temporal dead zone). |
GetValue()
JsModuleBinding.csReads the value of the binding (GetBindingValue).
public JsValue GetValue()