Click to see the query in the CodeQL repository
Class methods and arrow functions must not be invoked using new, and attempting to do so will result in a runtime error.
Conversely, constructors can only be invoked using new or super(...), and attempting to invoke them as a normal function will result in a runtime error.
Correct the invocation in question by adding or removing new as appropriate.
In the following example, Point is a class, but on line 8 it is invoked without new. This will lead to a runtime error.
Instead, new should be used:
Mozilla Developer Network: Constructors.
Mozilla Developer Network: Arrow functions.
Mozilla Developer Network: Method definitions.