Wraps a synchronous interface as a promised interface.
This function tries to avoid wrapping methods inherited from
built-in JS object types (e.g., Object, Array, Function, etc.).
The initial use case for this function is for unit testing
file locking in php-wasm. Php-wasm for JSPI expects the file lock manager
to be a promised interface used via comlink,
but the interface itself is synchronous.
Wraps a synchronous interface as a promised interface.
This function tries to avoid wrapping methods inherited from built-in JS object types (e.g.,
Object,Array,Function, etc.).The initial use case for this function is for unit testing file locking in php-wasm. Php-wasm for JSPI expects the file lock manager to be a promised interface used via comlink, but the interface itself is synchronous.