Why does `binary operation argument type newval is not compatible with type string` appear

后端 未结 1 1214
日久生厌
日久生厌 2021-01-07 19:26

I have the following code and inside of it the WebStorm inspection Binary operation argument type newVal is not compatible with type string appears:

相关标签:
1条回答
  • 2021-01-07 19:44

    AngularJS's JSDoc definition makes WebStorm think the path argument is a boolean.

    You can make WebStorm stop complaining by adding your own JSDoc:

    if (path !== /** @type {boolean} */"") {

    0 讨论(0)
提交回复
热议问题