method
ShadowRealm.importValue
specifier: string,
bindingName: string
): Promise<any>;
Imports bindingName from the module at specifier, executed inside the realm, and resolves with its value. Functions come back as wrapped functions that chain their calls to the binding inside the realm.
const red = new ShadowRealm();
const redAdd = await red.importValue('./inside-code.js', 'add');
console.assert(redAdd(2, 3) === 5);