2018-10-09 19:38:46 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @allowJs: true
|
|
|
|
// @checkJs: true
|
|
|
|
// @noImplicitAny: true
|
|
|
|
// @strictNullChecks: true
|
|
|
|
// @Filename: important.js
|
|
|
|
/////**
|
|
|
|
//// * @param {*} y
|
|
|
|
//// */
|
|
|
|
////function f(x, y, z) {
|
|
|
|
//// return x
|
|
|
|
////}
|
|
|
|
////f(1, 2, 3)
|
|
|
|
|
2018-10-25 00:34:15 +02:00
|
|
|
verify.codeFix({
|
|
|
|
description: "Infer parameter types from usage",
|
2018-11-02 23:39:27 +01:00
|
|
|
index: 0,
|
2018-10-25 00:34:15 +02:00
|
|
|
newFileContent:
|
|
|
|
`/**
|
2018-10-09 19:38:46 +02:00
|
|
|
* @param {*} y
|
|
|
|
* @param {number} x
|
|
|
|
* @param {number} z
|
|
|
|
*/
|
|
|
|
function f(x, y, z) {
|
|
|
|
return x
|
|
|
|
}
|
2018-10-25 00:34:15 +02:00
|
|
|
f(1, 2, 3)`,
|
|
|
|
});
|