TypeScript/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyLiterals.ts

21 lines
467 B
TypeScript
Raw Normal View History

2016-12-08 02:12:42 +01:00
/// <reference path='fourslash.ts' />
//// interface I {
//// ["foo"](o: any): boolean;
//// ["x"]: boolean;
//// [1](): string;
//// [2]: boolean;
//// }
2016-12-09 01:34:15 +01:00
////
2017-03-13 17:18:40 +01:00
//// class C implements I {[| |]}
2016-12-08 02:12:42 +01:00
verify.rangeAfterCodeFix(`
["foo"](o: any): boolean {
2017-03-13 02:52:38 +01:00
throw new Error("Method not implemented.");
2016-12-08 02:12:42 +01:00
}
["x"]: boolean;
2017-01-09 15:36:07 +01:00
[1](): string {
2017-03-13 02:52:38 +01:00
throw new Error("Method not implemented.");
2017-01-09 15:36:07 +01:00
}
[2]: boolean;
2016-12-08 02:12:42 +01:00
`);