TypeScript/tests/cases/fourslash/codeFixInferFromUsageCommentAfterParameter.ts
Nathan Shively-Sanders 052a3d9d73 Infer void from expr statement usage, not calls
This makes inferences a lot better.
2019-09-05 16:16:35 -07:00

25 lines
477 B
TypeScript

/// <reference path='fourslash.ts' />
// @allowJs: true
// @checkJs: true
// @noEmit: true
// @noImplicitAny: true
// @Filename: important.js
////function coll(callback /*, name1, name2, ... */) {
//// return callback(this);
////}
verify.codeFix({
description: "Infer parameter types from usage",
index: 0,
newFileContent:
`/**
* @param {(arg0: any) => any} callback
*/
function coll(callback /*, name1, name2, ... */) {
return callback(this);
}`,
});