2018-10-09 19:38:46 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @allowJs: true
|
|
|
|
// @checkJs: true
|
|
|
|
// @noEmit: true
|
|
|
|
// @noImplicitAny: true
|
|
|
|
// @Filename: important.js
|
|
|
|
////class C {m(x) {return x;}}
|
|
|
|
////var c = new C()
|
|
|
|
////c.m(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:
|
|
|
|
`class C {/**
|
2018-10-25 01:14:52 +02:00
|
|
|
* @param {number} x
|
|
|
|
*/
|
|
|
|
m(x) {return x;}}
|
2018-10-09 19:38:46 +02:00
|
|
|
var c = new C()
|
2018-10-25 00:34:15 +02:00
|
|
|
c.m(1)`,
|
|
|
|
});
|