Skip to content

Commit c22e47d

Browse files
author
Arthur Ozga
committed
add test for computed literals
1 parent 5cd0ea3 commit c22e47d

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
//// interface I {
4+
//// ["foo"](o: any): boolean;
5+
//// ["x"]: boolean;
6+
//// [1](): string;
7+
//// [2]: boolean;
8+
//// }
9+
10+
//// class C implements I {[| |]}
11+
12+
verify.rangeAfterCodeFix(`
13+
[1](): string {
14+
throw new Error('Method not implemented.');
15+
}
16+
[2]: boolean;
17+
["foo"](o: any): boolean {
18+
throw new Error('Method not implemented.');
19+
}
20+
["x"]: boolean;
21+
`);

tests/cases/fourslash/codeFixUnImplementedInterfaceComputedPropertyNameWellKnownSymbols.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//// interface I<Species> {
66
//// [Symbol.hasInstance](o: any): boolean;
77
//// [Symbol.isConcatSpreadable]: boolean;
8-
//// [Symbol.iterator](): Iterator<this>;
8+
//// [Symbol.iterator](): any;
99
//// [Symbol.match]: boolean;
1010
//// [Symbol.replace](...args);
1111
//// [Symbol.search](str: string): number;
@@ -20,7 +20,6 @@
2020
////
2121
//// class C implements I<number> {[| |]}
2222

23-
2423
verify.rangeAfterCodeFix(`
2524
[Symbol.hasInstance](o: any): boolean {
2625
throw new Error('Method not implemented.');

0 commit comments

Comments
 (0)