Skip to content

Commit 80e3b72

Browse files
committed
Adding repro from microsoft#4818 to test
1 parent eb73565 commit 80e3b72

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
/// <reference path='fourslash.ts'/>
22

3+
// Repros from issues #4949 and #4818
4+
35
////const result = [{ foo: 'hello' }]
46
//// .map(({ /*1*/foo }) => /*2*/foo)
57
//// .map(foo => foo);
8+
////
9+
////const f = (foo: (bar: string[]) => void) => { };
10+
////
11+
////f(([a, b]) => {
12+
//// /*3*/a.charAt(0); // Not okay: inferred as `any`
13+
////});
614

715
goTo.marker('1');
816
verify.quickInfoIs('var foo: string');
917

1018
goTo.marker('2');
1119
verify.quickInfoIs('var foo: string');
20+
21+
goTo.marker('3');
22+
verify.quickInfoIs('var a: string');

0 commit comments

Comments
 (0)