Files
tsgo/testdata/baselines/reference/submodule/conformance/propertyAndFunctionWithSameName.js

26 lines
421 B
TypeScript

//// [tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts] ////
//// [propertyAndFunctionWithSameName.ts]
class C {
x: number;
x() { // error
return 1;
}
}
class D {
x: number;
x(v) { } // error
}
//// [propertyAndFunctionWithSameName.js]
"use strict";
class C {
x() {
return 1;
}
}
class D {
x(v) { } // error
}