29 lines
735 B
Plaintext
29 lines
735 B
Plaintext
==== tests/cases/compiler/constructorParametersInVariableDeclarations.ts (6 errors) ====
|
|
class A {
|
|
private a = x;
|
|
~
|
|
!!! Cannot find name 'x'.
|
|
private b = { p: x };
|
|
~
|
|
!!! Cannot find name 'x'.
|
|
private c = () => x;
|
|
~
|
|
!!! Cannot find name 'x'.
|
|
constructor(x: number) {
|
|
}
|
|
}
|
|
|
|
class B {
|
|
private a = x;
|
|
~
|
|
!!! Cannot find name 'x'.
|
|
private b = { p: x };
|
|
~
|
|
!!! Cannot find name 'x'.
|
|
private c = () => x;
|
|
~
|
|
!!! Cannot find name 'x'.
|
|
constructor() {
|
|
var x = 1;
|
|
}
|
|
} |