2018-02-23 16:25:50 +01:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @strict: true
|
|
|
|
|
|
|
|
//// abstract class A { abstract a (); }
|
|
|
|
////
|
|
|
|
//// class TT { constructor () {} }
|
|
|
|
////
|
|
|
|
//// class AT extends A { a () {} }
|
2018-03-28 03:21:21 +02:00
|
|
|
////
|
2018-02-23 16:25:50 +01:00
|
|
|
//// class Foo {}
|
|
|
|
////
|
|
|
|
//// class T {
|
2018-03-28 03:21:21 +02:00
|
|
|
////
|
2018-06-08 00:03:38 +02:00
|
|
|
//// a: boolean;
|
2018-03-28 03:21:21 +02:00
|
|
|
////
|
2018-06-08 00:03:38 +02:00
|
|
|
//// static b: boolean;
|
2018-03-28 03:21:21 +02:00
|
|
|
////
|
2018-06-08 00:03:38 +02:00
|
|
|
//// private c: boolean;
|
2018-03-28 03:21:21 +02:00
|
|
|
////
|
2018-02-23 16:25:50 +01:00
|
|
|
//// d: number | undefined;
|
2018-03-28 03:21:21 +02:00
|
|
|
////
|
2018-06-08 00:03:38 +02:00
|
|
|
//// e: string | boolean;
|
2018-03-28 03:21:21 +02:00
|
|
|
////
|
2018-02-23 16:25:50 +01:00
|
|
|
//// f: 1;
|
2018-03-28 03:21:21 +02:00
|
|
|
////
|
2018-02-23 16:25:50 +01:00
|
|
|
//// g: "123" | "456";
|
2018-03-28 03:21:21 +02:00
|
|
|
////
|
2018-02-23 16:25:50 +01:00
|
|
|
//// h: boolean;
|
2018-03-28 03:21:21 +02:00
|
|
|
////
|
2018-02-23 16:25:50 +01:00
|
|
|
//// i: TT;
|
2018-03-28 03:21:21 +02:00
|
|
|
////
|
2018-02-23 16:25:50 +01:00
|
|
|
//// j: A;
|
2018-03-28 03:21:21 +02:00
|
|
|
////
|
2018-02-23 16:25:50 +01:00
|
|
|
//// k: AT;
|
2018-03-28 03:21:21 +02:00
|
|
|
////
|
2018-02-23 16:25:50 +01:00
|
|
|
//// l: Foo;
|
2018-06-09 00:56:56 +02:00
|
|
|
////
|
|
|
|
//// m: number[];
|
2018-02-23 16:25:50 +01:00
|
|
|
//// }
|
|
|
|
|
|
|
|
verify.codeFixAll({
|
|
|
|
fixId: 'addMissingPropertyInitializer',
|
2018-03-28 03:21:21 +02:00
|
|
|
fixAllDescription: "Add initializers to all uninitialized properties",
|
2018-02-23 16:25:50 +01:00
|
|
|
newFileContent: `abstract class A { abstract a (); }
|
|
|
|
|
|
|
|
class TT { constructor () {} }
|
|
|
|
|
|
|
|
class AT extends A { a () {} }
|
|
|
|
|
|
|
|
class Foo {}
|
|
|
|
|
|
|
|
class T {
|
|
|
|
|
2018-06-08 00:03:38 +02:00
|
|
|
a: boolean = false;
|
2018-02-23 16:25:50 +01:00
|
|
|
|
2018-06-08 00:03:38 +02:00
|
|
|
static b: boolean;
|
2018-02-23 16:25:50 +01:00
|
|
|
|
2018-06-08 00:03:38 +02:00
|
|
|
private c: boolean = false;
|
2018-02-23 16:25:50 +01:00
|
|
|
|
|
|
|
d: number | undefined;
|
|
|
|
|
2018-06-08 00:03:38 +02:00
|
|
|
e: string | boolean = false;
|
2018-02-23 16:25:50 +01:00
|
|
|
|
|
|
|
f: 1 = 1;
|
|
|
|
|
|
|
|
g: "123" | "456" = "123";
|
|
|
|
|
|
|
|
h: boolean = false;
|
|
|
|
|
|
|
|
i: TT = new TT;
|
|
|
|
|
|
|
|
j: A;
|
|
|
|
|
|
|
|
k: AT = new AT;
|
|
|
|
|
|
|
|
l: Foo = new Foo;
|
2018-06-09 00:56:56 +02:00
|
|
|
|
|
|
|
m: number[] = [];
|
2018-02-23 16:25:50 +01:00
|
|
|
}`
|
|
|
|
});
|