【问题标题】:eslint error: 'Uint32Array' is not defined. no-undefeslint 错误:未定义“Uint32Array”。无非定义
【发布时间】:2020-06-30 22:34:57
【问题描述】:

Uint32Array 与 TypeScript 和 eslint 一起使用时,出现此错误。

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

我该如何解决这个问题?

我的 eslintrc 看起来像这样(使用 YAML 语法):

env:
  browser: true
  jasmine: true
  jest:

【问题讨论】:

    标签: eslint typed-arrays eslintrc


    【解决方案1】:

    您需要将"es6": true 添加到您的 .eslintrc 文件中。这告诉 eslint 使用浏览器 JS 引擎提供的 "builtin" 全局变量。

    猜你喜欢
    • 2017-01-23
    • 1970-01-01
    • 2018-02-12
    • 2017-07-11
    • 2017-10-29
    • 2018-09-28
    • 2019-05-06
    • 2018-11-26
    相关资源
    最近更新 更多