* When --noUnusedLocals/--noUnusedParameters is disabled, add suggestions instead of errors * Improve performance: do not add unused suggestion diagnostics unless asking for a suggestion * Add "unused" flag to diagnostics * Code review * reportsUnused -> reportsUnnecessary * Fix test
33 lines
688 B
TypeScript
33 lines
688 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
////abstract class A {
|
|
//// abstract x: number;
|
|
//// private y: number;
|
|
//// protected z: number;
|
|
//// public w: number;
|
|
//// public useY() { this.y; }
|
|
////}
|
|
////
|
|
////class C implements A {[| |]}
|
|
|
|
verify.codeFix({
|
|
description: "Implement interface 'A'",
|
|
newFileContent:
|
|
`abstract class A {
|
|
abstract x: number;
|
|
private y: number;
|
|
protected z: number;
|
|
public w: number;
|
|
public useY() { this.y; }
|
|
}
|
|
|
|
class C implements A {
|
|
x: number;
|
|
protected z: number;
|
|
public w: number;
|
|
public useY(): void {
|
|
throw new Error("Method not implemented.");
|
|
}
|
|
}`,
|
|
});
|