2017-09-25 18:02:42 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @Filename: test123.ts
|
|
|
|
/////** @type {number} */
|
2018-03-06 16:49:21 +01:00
|
|
|
////var [|x|];
|
2017-09-25 18:02:42 +02:00
|
|
|
|
2018-10-12 01:15:38 +02:00
|
|
|
verify.getSuggestionDiagnostics([
|
|
|
|
{ message: "JSDoc types may be moved to TypeScript types.", code: 80004 },
|
2018-10-29 21:23:33 +01:00
|
|
|
{ message: "Variable 'x' implicitly has an 'any' type, but a better type may be inferred from usage.", code: 7043 }]);
|
2018-03-06 16:49:21 +01:00
|
|
|
|
|
|
|
verify.codeFix({
|
|
|
|
description: "Annotate with type from JSDoc",
|
2018-10-29 21:23:33 +01:00
|
|
|
index: 0,
|
2018-03-06 16:49:21 +01:00
|
|
|
newFileContent:
|
2017-09-25 18:02:42 +02:00
|
|
|
`/** @type {number} */
|
2018-03-06 16:49:21 +01:00
|
|
|
var x: number;`,
|
|
|
|
});
|