-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Description
TypeScript Version: 2.1.1
Code
new Map([
['a', {
prop: {}
}],
['b', { }]
]);Expected behavior:
Creates a new Map with the keys a and b.
Actual behavior:
Error:(10, 9) TS2345:Argument of type '((string | { prop: {}; })[] | {}[])[]' is not assignable to parameter of type 'IterableShim<[{}, {}]>'.
Types of property '"_es6-shim iterator_"' are incompatible.
Type '() => IterableIteratorShim<(string | { prop: {}; })[] | {}[]>' is not assignable to type '() => Iterator<[{}, {}]>'.
Type 'IterableIteratorShim<(string | { prop: {}; })[] | {}[]>' is not assignable to type 'Iterator<[{}, {}]>'.
Types of property 'next' are incompatible.
Type '{ (value?: any): IteratorResult<(string | { prop: {}; })[] | {}[]>; (value?: any): IteratorResult...' is not assignable to type '{ (value?: any): IteratorResult<[{}, {}]>; (value?: any): IteratorResult<[{}, {}]>; (value?: any)...'.
Type 'IteratorResult<(string | { prop: {}; })[] | {}[]>' is not assignable to type 'IteratorResult<[{}, {}]>'.
Type '(string | { prop: {}; })[] | {}[]' is not assignable to type '[{}, {}]'.
Type '(string | { prop: {}; })[]' is not assignable to type '[{}, {}]'.
Property '0' is missing in type '(string | { prop: {}; })[]'.
Metadata
Metadata
Assignees
Labels
No labels