ce85ee5115
This makes it appear before the ts-ignore codefix, specifically.
28 lines
450 B
TypeScript
28 lines
450 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
// @noImplicitAny: true
|
|
// @Filename: important.js
|
|
////class C {
|
|
//// set [|x(v)|] {
|
|
//// v;
|
|
//// }
|
|
////}
|
|
////(new C).x = 1;
|
|
|
|
verify.codeFix({
|
|
description: "Infer type of \'x\' from usage",
|
|
index: 0,
|
|
newFileContent:
|
|
`class C {
|
|
/**
|
|
* @param {number} v
|
|
*/
|
|
set x(v) {
|
|
v;
|
|
}
|
|
}
|
|
(new C).x = 1;`,
|
|
});
|