Search code examples
eslinttyped-arrayseslintrc

eslint error: 'Uint32Array' is not defined. no-undef


When using Uint32Array with TypeScript and eslint, I to this error.

34:43 error 'Uint32Array' is not defined   no-undef

How do I fix this?

My eslintrc looks like this (YAML syntax used):

env:
  browser: true
  jasmine: true
  jest:

Solution

  • You need to add "es6": true to you .eslintrc file. This tells eslint to consume the "builtin" globals that the browser JS engine provides.