2018-10-09 19:38:46 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @allowJs: true
|
|
|
|
// @checkJs: true
|
|
|
|
// @noImplicitAny: true
|
|
|
|
// @Filename: important.js
|
|
|
|
////function f([|a|]){
|
|
|
|
//// a;
|
|
|
|
////}
|
|
|
|
////f();
|
|
|
|
////f(1);
|
|
|
|
|
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 {number} [a]
|
|
|
|
*/
|
2018-10-25 00:34:15 +02:00
|
|
|
function f(a){
|
2018-10-09 19:38:46 +02:00
|
|
|
a;
|
|
|
|
}
|
|
|
|
f();
|
2018-10-25 00:34:15 +02:00
|
|
|
f(1);`,
|
|
|
|
});
|