Files
tsgo/testdata/baselines/reference/submodule/compiler/es6MemberScoping.js

33 lines
609 B
TypeScript

//// [tests/cases/compiler/es6MemberScoping.ts] ////
//// [es6MemberScoping.ts]
class Foo {
constructor(store: string) { }
public foo() {
return this._store.length;
}
public _store = store; // should be an error.
}
class Foo2 {
static Foo2():number { return 0; } // should not be an error
}
//// [es6MemberScoping.js]
"use strict";
class Foo {
constructor(store) {
this._store = store; // should be an error.
}
foo() {
return this._store.length;
}
}
class Foo2 {
static Foo2() { return 0; } // should not be an error
}