* 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
21 lines
342 B
TypeScript
21 lines
342 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
/////**
|
|
//// * @param {number} x
|
|
//// * @returns {number}
|
|
//// */
|
|
////function f(x) {
|
|
//// return x;
|
|
////}
|
|
|
|
verify.codeFix({
|
|
description: "Annotate with type from JSDoc",
|
|
newFileContent:
|
|
`/**
|
|
* @param {number} x
|
|
* @returns {number}
|
|
*/
|
|
function f(x: number): number {
|
|
return x;
|
|
}`,
|
|
});
|