Type checker for JavaScript?

后端 未结 5 627
[愿得一人]
[愿得一人] 2020-12-07 02:02

Does anyone know if there\'s a good tool for analyzing JavaScript code and detecting type errors? I know that JavaScript itself is weakly and dynamically typed, but it woul

5条回答
  •  不知归路
    2020-12-07 02:27

    One another option - https://github.com/yarax/typelint

    It's an EsLint plugin, that does type check based on JSDoc annotations.

    In addition it supports it's own extension to use Redux state or Swagger schemas (basically any JSON schema) for type check. So you don't need to describe complex composite types by yourself.

提交回复
热议问题