2016-12-08 02:12:42 +01:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
2017-12-07 21:14:18 +01:00
|
|
|
////interface I {
|
|
|
|
//// ["foo"](o: any): boolean;
|
|
|
|
//// ["x"]: boolean;
|
|
|
|
//// [1](): string;
|
|
|
|
//// [2]: boolean;
|
|
|
|
////}
|
2016-12-09 01:34:15 +01:00
|
|
|
////
|
2017-12-07 21:14:18 +01:00
|
|
|
////class C implements I {}
|
2016-12-08 02:12:42 +01:00
|
|
|
|
2017-12-07 21:14:18 +01:00
|
|
|
verify.codeFix({
|
|
|
|
description: "Implement interface 'I'",
|
|
|
|
newFileContent:
|
|
|
|
`interface I {
|
|
|
|
["foo"](o: any): boolean;
|
2016-12-08 02:12:42 +01:00
|
|
|
["x"]: boolean;
|
2017-12-07 21:14:18 +01:00
|
|
|
[1](): string;
|
2017-01-09 15:36:07 +01:00
|
|
|
[2]: boolean;
|
2017-12-07 21:14:18 +01:00
|
|
|
}
|
|
|
|
|
2018-01-12 02:43:27 +01:00
|
|
|
class C implements I {
|
|
|
|
["foo"](o: any): boolean {
|
|
|
|
throw new Error("Method not implemented.");
|
|
|
|
}
|
|
|
|
["x"]: boolean;
|
|
|
|
[1](): string {
|
|
|
|
throw new Error("Method not implemented.");
|
|
|
|
}
|
|
|
|
[2]: boolean;
|
2017-12-07 21:14:18 +01:00
|
|
|
}`,
|
|
|
|
});
|