2017-12-07 21:14:18 +01:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @noUnusedLocals: true
|
|
|
|
// @noUnusedParameters: true
|
|
|
|
|
2020-04-17 22:18:05 +02:00
|
|
|
/////**
|
|
|
|
//// * @param a First parameter.
|
|
|
|
//// * @param b Second parameter.
|
|
|
|
//// */
|
2017-12-07 21:14:18 +01:00
|
|
|
////function f(a, b) {
|
|
|
|
//// const x = 0; // Can't be prefixed, ignored
|
|
|
|
////}
|
2018-07-27 20:55:31 +02:00
|
|
|
////type Length<T> = T extends ArrayLike<infer U> ? number : never;
|
2017-12-07 21:14:18 +01:00
|
|
|
|
|
|
|
verify.codeFixAll({
|
|
|
|
fixId: "unusedIdentifier_prefix",
|
2018-03-28 03:21:21 +02:00
|
|
|
fixAllDescription: "Prefix all unused declarations with '_' where possible",
|
2017-12-07 21:14:18 +01:00
|
|
|
newFileContent:
|
2020-04-17 22:18:05 +02:00
|
|
|
`/**
|
|
|
|
* @param _a First parameter.
|
|
|
|
* @param _b Second parameter.
|
|
|
|
*/
|
|
|
|
function f(_a, _b) {
|
2017-12-07 21:14:18 +01:00
|
|
|
const x = 0; // Can't be prefixed, ignored
|
2018-07-27 20:55:31 +02:00
|
|
|
}
|
|
|
|
type Length<T> = T extends ArrayLike<infer _U> ? number : never;`,
|
2017-12-07 21:14:18 +01:00
|
|
|
});
|