No overload matches this call. Overload 1 of 4, '(iterable?: Iterable<readonly [unknown, unknown]> | null | undefined): Map<unknown, unknown>' #56120
Labels
Design Limitation
Constraints of the existing architecture prevent this from being fixed
🔎 Search Terms
"No overload matches this call" '(iterable?: Iterable<readonly [unknown, unknown]> | null | undefined): Map<unknown, unknown>'
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play?#code/MYewdgzgLgBAlmADgV1gXhmApgdxgWQENEAKAbRjIHJjEAbLKgGioCcsATKgXScqoBGhMMMLMqATyx06IHDxjcAlAG4AsAChseIqTIA6QwhRRu+gLbESWMFFYSYaAHwwbdifvYA3LKwhYSJSCVIA
💻 Code
🙁 Actual behavior
compile error:
No overload matches this call.
Overload 1 of 4, '(iterable?: Iterable<readonly [unknown, unknown]> | null | undefined): Map<unknown, unknown>', gave the following error.
Argument of type 'string[][]' is not assignable to parameter of type 'Iterable<readonly [unknown, unknown]>'.
The types returned by 'Symbol.iterator.next(...)' are incompatible between these types.
Type 'IteratorResult<string[], any>' is not assignable to type 'IteratorResult<readonly [unknown, unknown], any>'.
Type 'IteratorYieldResult<string[]>' is not assignable to type 'IteratorResult<readonly [unknown, unknown], any>'.
Type 'IteratorYieldResult<string[]>' is not assignable to type 'IteratorYieldResult<readonly [unknown, unknown]>'.
Type 'string[]' is not assignable to type 'readonly [unknown, unknown]'.
Target requires 2 element(s) but source may have fewer.
Overload 2 of 4, '(entries?: readonly (readonly [unknown, unknown])[] | null | undefined): Map<unknown, unknown>', gave the following error.
Argument of type 'string[][]' is not assignable to parameter of type 'readonly (readonly [unknown, unknown])[]'.
Type 'string[]' is not assignable to type 'readonly [unknown, unknown]'.
🙂 Expected behavior
No compile error
Additional information about the issue
This JavaScript code has no compile error at https://developer.mozilla.org/en-US/play .
i.e. It works.
The text was updated successfully, but these errors were encountered: