jsdc icon indicating copy to clipboard operation
jsdc copied to clipboard

支持new.target

Open hax opened this issue 9 years ago • 2 comments

class A {
        constructor() {
                console.log(new.target.name)
        }
}

class B extends A {}


new A // -> A
new B // -> B

babel对应的issue:https://github.com/babel/babel/issues/1088

spec:http://www.ecma-international.org/ecma-262/6.0/index.html#sec-meta-properties

hax avatar Jul 06 '15 10:07 hax

好累啊,维护不过来了……ToT

army8735 avatar Jul 06 '15 13:07 army8735

这个 issue 是不是一直还没解决呢?

zwhu avatar Sep 29 '15 14:09 zwhu