TypeScript/tests/cases/compiler/unusedSetterInClass2.ts

10 lines
192 B
TypeScript
Raw Normal View History

// @noUnusedLocals:true
// Unlike everything else, a setter without a getter is used by a write access.
class Employee {
private set p(_: number) {}
m() {
this.p = 0;
}
}