1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
/// <reference path='fourslash.ts' />
////class A {
//// constructor() {
//// this._x = 10;
//// }
////}
verify.codeFixAvailable([
{ description: "Declare private property '_x'" },
{ description: "Declare property '_x'" },
{ description: "Add index signature for property '_x'" }
])
verify.codeFix({
description: [ts.Diagnostics.Declare_private_property_0.message, "_x"],
index: 0,
newFileContent:
`class A {
private _x: number;
constructor() {
this._x = 10;
}
}`
});
|