* 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
20 lines
391 B
TypeScript
20 lines
391 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
////class C {
|
|
//// /**
|
|
//// * @param {number} x - the first parameter
|
|
//// */
|
|
//// constructor(readonly x) {
|
|
//// }
|
|
////}
|
|
|
|
verify.codeFix({
|
|
description: "Annotate with type from JSDoc",
|
|
newFileContent:
|
|
`class C {
|
|
/**
|
|
* @param {number} x - the first parameter
|
|
*/
|
|
constructor(readonly x: number) {
|
|
}
|
|
}`,
|
|
});
|