tests/cases/compiler/constructorParametersInVariableDeclarations.ts(2,17): error TS2304: Cannot find name 'x'. tests/cases/compiler/constructorParametersInVariableDeclarations.ts(3,22): error TS2304: Cannot find name 'x'. tests/cases/compiler/constructorParametersInVariableDeclarations.ts(4,23): error TS2304: Cannot find name 'x'. tests/cases/compiler/constructorParametersInVariableDeclarations.ts(10,17): error TS2304: Cannot find name 'x'. tests/cases/compiler/constructorParametersInVariableDeclarations.ts(11,22): error TS2304: Cannot find name 'x'. tests/cases/compiler/constructorParametersInVariableDeclarations.ts(12,23): error TS2304: Cannot find name 'x'. ==== tests/cases/compiler/constructorParametersInVariableDeclarations.ts (6 errors) ==== class A { private a = x; ~ !!! error TS2304: Cannot find name 'x'. private b = { p: x }; ~ !!! error TS2304: Cannot find name 'x'. private c = () => x; ~ !!! error TS2304: Cannot find name 'x'. constructor(x: number) { } } class B { private a = x; ~ !!! error TS2304: Cannot find name 'x'. private b = { p: x }; ~ !!! error TS2304: Cannot find name 'x'. private c = () => x; ~ !!! error TS2304: Cannot find name 'x'. constructor() { var x = 1; } }