TypeScript/tests/cases/fourslash/codeFixAddAllParameterNames.ts
Nathan Shively-Sanders 6cee7c3080
Better nameless parameter implicit any error (#28554)
* Initial version, doesn't work for primitives yet.

Need to find out why.

* Primitives now work, plus improve error message

null and void don't even parse without parameter names so they are not
tested.

* Codefix: Add names to nameless parameters

* Improve error wording

* Add detail to error message
2018-11-15 12:45:39 -08:00

14 lines
425 B
TypeScript

/// <reference path='fourslash.ts' />
////interface I { i: number }
////class C { a = 1 }
////var x: { (boolean, undefined, I, C): string };
verify.codeFixAll({
fixId: "addNameToNamelessParameter",
fixAllDescription: "Add names to all parameters without names",
newFileContent:
`interface I { i: number }
class C { a = 1 }
var x: { (arg0: boolean, arg1: undefined, arg2: I, arg3: C): string };`
});