代码之家  ›  专栏  ›  技术社区  ›  Kevin Amiranoff

Typescript/tslint不抱怨未使用的实例方法/属性或此in-arrow函数

  •  0
  • Kevin Amiranoff  · 技术社区  · 7 年前

    const TopBar = () => (
      <Button
        onPress={this.onPress} // Not complaining
      />
    )
    

    tslint.json 我们正在按预期工作。

    如何执行 typescript / tslint 在这种情况下投诉?

    我正在使用 "typescript": "^3.3.3333" React Native 项目

    0 回复  |  直到 7 年前
        1
  •  1
  •   Kevin Amiranoff    7 年前

    我不得不加上 compilerOptions 在里面 tsconfig.json
    "noImplicitThis": true

    推荐文章