PhpStorm 错误地认为 Event 构造函数没有任何参数

PhpStorm incorrectly percieves the Event constructor to not to have any arguments

Event 构造函数接受 typeArg 作为表示事件名称的第一个参数。

class MyEvent extends Event {
   constructor(type, myData) {
      super(type); // <-- JetBrains PhpStorm complains: Invalid number of arguments, expected 0 
      //   ^^^^^^
   }
}

当通过 super() 调用构造函数时,JetBrains PhpStorm 抱怨:

Invalid number of arguments, expected 0

虽然它不仅应该期望 typeArg,而且还可以有一个可选的 eventInit!那么,这是为什么以及如何解决警告?

已知问题,WEB-40312 已在即将推出的 PhpStorm 2020.1

中修复