I'm getting a lot of Closure warnings in my EM_JS() functions since updating to 3.1.24.
For instance, when passing an XMLHttpRequest array buffer response to new Uint8Array, Closure can't figure out that this is indeed an ArrayBuffer.
var u8_array = new Uint8Array(req.response);
This results in a warning
[JSC_TYPE_MISMATCH] actual parameter 1 of Uint8Array does not match formal parameter
found : (Object|null|string)
required: (Array<number>|ArrayBuffer|ArrayBufferView|SharedArrayBuffer|null|number)
768| var u8_array = new Uint8Array(req.response);
^^^^^^^^
I googled around and found out that Closure takes type hints like this:
var u8_array = new Uint8Array(/** @type {!ArrayBuffer} */(req.response));
Any ideas how to best deal with this?
Cheers,
-Floh.