javascriptpebble-watchpebble-sdkcloudpebble

Declaring a Uint8Array in CloudPebble ... says its undefined


I need to make a Uinte8Array. I am using CloudPebble and it says that Uint8Array is not defined.

How can I declare this object in CloudPebble?

https://i.sstatic.net/w7eTU.png


Solution

  • CloudPebble is lying, you can use it. I'll put a report in to fix it, so it doesn't lie to you.

    If you want to you can wrap the erroneous line like this so jshint won't complain.

    /* jshint ignore:start */
    var byteArray = new Uint8Array(buf);
    /* jshint ignore:end */