Skip to content

Commit 12b9bd4

Browse files
committed
Add tests
1 parent b0a1df3 commit 12b9bd4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
//// enum Key {
4+
//// A = "a",
5+
//// B = "b"
6+
//// }
7+
////
8+
//// // Produces members with union name types (Key.A | "a", Key.B | "b")
9+
//// type [|Foo|] = { [K in Key | `${Key}`]: 1 }
10+
////
11+
//// // Should produce the same type as Foo
12+
//// type [|Bar|] = { [K in keyof Foo]: 1 }
13+
14+
const [Foo, Bar] = test.ranges()
15+
16+
verify.quickInfoAt(Foo,
17+
`type Foo = {
18+
a: 1;
19+
b: 1;
20+
}`)
21+
22+
verify.quickInfoAt(Bar,
23+
`type Bar = {
24+
a: 1;
25+
b: 1;
26+
}`)

0 commit comments

Comments
 (0)