Yes, the `[[PromiseValue]]` could theoretically be changed, given adequate effort. Is it impossible to get the [[PromiseValue]] from a Promise object without using the Promise object's then method? [duplicate] https://stackoverflow.com/q/41201360. The example of using `Object.freeze()` could also be extended to the value passed to `Promise.resolve()`.
Using `Object.freeze()` and/or `WeakMap` might be useful for the use cases described. rustwasm https://github.com/rustwasm/wasm-bindgen is an active repository for "Facilitating high-level interactions between wasm modules and JavaScript" and have several issues addressing types re wasm and JavaScript, which might be helpful for specific and general issues encountered. Determining if a value is an Object is a task in itself How to filter Object using Array.prototype.filter? https://stackoverflow.com/q/36232576; Why is there not a built-in method in JavaScript to check if an object is a plain object? https://stackoverflow.com/q/40456491, and even if this proposal were implemented would/could it stop `Object = 1; Object.entries([]) // Uncaught TypeError: Object.entries is not a function`?
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

