<commit_before>/// <reference path='fourslash.ts'/>

////const result = [{ foo: 'hello' }]
////    .map(({ /*1*/foo }) => /*2*/foo)
////    .map(foo => foo);

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

goTo.marker('2');
verify.quickInfoIs('var foo: string');
<commit_msg>Adding repro from #4818 to test<commit_after>/// <reference path='fourslash.ts'/>

// Repros from issues #4949 and #4818

////const result = [{ foo: 'hello' }]
////    .map(({ /*1*/foo }) => /*2*/foo)
////    .map(foo => foo);
////
////const f = (foo: (bar: string[]) => void) => { };
////
////f(([a, b]) => {
////    /*3*/a.charAt(0); // Not okay: inferred as `any`
////});

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

goTo.marker('2');
verify.quickInfoIs('var foo: string');

goTo.marker('3');
verify.quickInfoIs('var a: string');

{'fraction_non_alphanumeric': 0.2852193995381062, 'fraction_numerical': 0.026558891454965358, 'mean_word_length': 2.5826446280991737, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2554411', 'n_tokens_mistral': 337, 'n_tokens_neox': 327, 'n_words': 69}