mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-24 02:21:30 -05:00
add test for computed literals
This commit is contained in:
@@ -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;
|
||||
`);
|
||||
@@ -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.');
|
||||
|
||||
Reference in New Issue
Block a user