mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
21 lines
684 B
Plaintext
21 lines
684 B
Plaintext
es6MemberScoping.ts(7,21): error TS2301: Initializer of instance member variable '_store' cannot reference identifier 'store' declared in the constructor.
|
|
|
|
|
|
==== es6MemberScoping.ts (1 errors) ====
|
|
class Foo {
|
|
constructor(store: string) { }
|
|
|
|
public foo() {
|
|
return this._store.length;
|
|
}
|
|
public _store = store; // should be an error.
|
|
~~~~~
|
|
!!! error TS2301: Initializer of instance member variable '_store' cannot reference identifier 'store' declared in the constructor.
|
|
}
|
|
|
|
class Foo2 {
|
|
|
|
static Foo2():number { return 0; } // should not be an error
|
|
|
|
}
|
|
|