TypeScript/tests/cases/fourslash/codeFixClassPropertyInitialization_all_1.ts
Andy 3e32e15895
Add 'fixAllDescription' property to CodeFixAction (#22616)
* Add 'fixAllDescription' property to CodeFixAction

* Code review

* Add to protocol

* Make fixAllDescription be just a string
2018-03-27 18:21:21 -07:00

77 lines
1.1 KiB
TypeScript

/// <reference path='fourslash.ts' />
// @strict: true
//// abstract class A { abstract a (); }
////
//// class TT { constructor () {} }
////
//// class AT extends A { a () {} }
////
//// class Foo {}
////
//// class T {
////
//// a: string;
////
//// static b: string;
////
//// private c: string;
////
//// d: number | undefined;
////
//// e: string | number;
////
//// f: 1;
////
//// g: "123" | "456";
////
//// h: boolean;
////
//// i: TT;
////
//// j: A;
////
//// k: AT;
////
//// l: Foo;
//// }
verify.codeFixAll({
fixId: 'addMissingPropertyDefiniteAssignmentAssertions',
fixAllDescription: "Add definite assignment assertions to all uninitialized properties",
newFileContent: `abstract class A { abstract a (); }
class TT { constructor () {} }
class AT extends A { a () {} }
class Foo {}
class T {
a!: string;
static b: string;
private c!: string;
d: number | undefined;
e!: string | number;
f!: 1;
g!: "123" | "456";
h!: boolean;
i!: TT;
j!: A;
k!: AT;
l!: Foo;
}`
});