I would expect this to work, but for some reason I’m still getting error.
My declaration file:
<code>declare var Array: {
isArray: (Object) => boolean,
}
</code>
<code>declare var Array: {
isArray: (Object) => boolean,
}
</code>
declare var Array: {
isArray: (Object) => boolean,
}
My code:
<code> } else if (Array.isArray(msg)) {
msg.push(value);
}
</code>
<code> } else if (Array.isArray(msg)) {
msg.push(value);
}
</code>
} else if (Array.isArray(msg)) {
msg.push(value);
}
My error:
<code>Cannot resolve name Array. [cannot-resolve-name]
</code>
<code>Cannot resolve name Array. [cannot-resolve-name]
</code>
Cannot resolve name Array. [cannot-resolve-name]
It works if I change the global variable to array
instead, but of course this won’t work in the browser.
Any tips?