TypeScript/tests/cases/fourslash/codeFixInferFromUsageCallJS.ts
Andrew Branch 797c5362a2
Codefix: Don’t return a fixId if there’s definitely nothing else that can be fixed (#35765)
* Start fixing fixId

* Fix tests

* Add comment

* Fix unit tests, remove fixAllDescription when unavailable

* Add codeFixAllAvailable to fourslash harness
2020-01-16 10:07:37 -08:00

21 lines
389 B
TypeScript

/// <reference path='fourslash.ts' />
// @allowJs: true
// @checkJs: true
// @noImplicitAny: true
// @Filename: test.js
////function wat(b) {
//// b();
////}
verify.codeFix({
index: 0,
description: ignoreInterpolations(ts.Diagnostics.Infer_parameter_types_from_usage),
newFileContent:
`/**
* @param {() => void} b
*/
function wat(b) {
b();
}`});