add test for computed literals

This commit is contained in:
Arthur Ozga 2016-12-07 17:12:42 -08:00
parent 5cd0ea3741
commit c22e47d26d
2 changed files with 22 additions and 2 deletions

View file

@ -0,0 +1,21 @@
/// <reference path='fourslash.ts' />
//// interface I {
//// ["foo"](o: any): boolean;
//// ["x"]: boolean;
//// [1](): string;
//// [2]: boolean;
//// }
//// class C implements I {[| |]}
verify.rangeAfterCodeFix(`
[1](): string {
throw new Error('Method not implemented.');
}
[2]: boolean;
["foo"](o: any): boolean {
throw new Error('Method not implemented.');
}
["x"]: boolean;
`);

View file

@ -5,7 +5,7 @@
//// interface I<Species> {
//// [Symbol.hasInstance](o: any): boolean;
//// [Symbol.isConcatSpreadable]: boolean;
//// [Symbol.iterator](): Iterator<this>;
//// [Symbol.iterator](): any;
//// [Symbol.match]: boolean;
//// [Symbol.replace](...args);
//// [Symbol.search](str: string): number;
@ -20,7 +20,6 @@
////
//// class C implements I<number> {[| |]}
verify.rangeAfterCodeFix(`
[Symbol.hasInstance](o: any): boolean {
throw new Error('Method not implemented.');