Flow breaks if you give it:
var x = new.target
It tells me that the "." is an unexpected token.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new.target
TIL. added it to #560 too.
Even get this error even with option: suppress_comment (flow v0.23.0) eg.
// $FlowIssue: https://github.com/facebook/flow/issues/1152
if (new.target === BaseClass) {
throw TypeError("new of abstract class BaseClass");
}
Is there any update on this one? I am like @rogchap, suppress_comment seems not to work with it.
The following is a parse error 0.38.0:
function a(x = new.target){}
I found no evidence it should be forbidden and both Firefox and Node read it without error.
I'm still getting this problem:
./node_modules/flow-bin/flow-osx-v0.40.0/flow check
src/components/SigmaReactGraph.js:40
40: if (new.target === MacroNode) {
^^^^^^^^^^ not (sup)ported
I'm still getting this problem:
./node_modules/flow-bin/flow-osx-v0.40.0/flow check src/components/SigmaReactGraph.js:40 40: if (new.target === MacroNode) { ^^^^^^^^^^ not (sup)ported
Same. What's the recommended way to do this?