264930
class A {
xhr: XMLHttpRequest;
constructor(name='fuck'){
this.name=name
}
}
var a = new A('suck')
console.log(a.name)
constructor上面那一行。在react相关的代码里看到了类似的写法,用(babel)[https://babeljs.io/repl/] 编译,发现如果不同时勾选react,stage-0就会报错。分别报repl: Unexpected token (3:5) 和 repl: Missing class properties transform. 难道说facebook自己实现了部分语法?