Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

types are wrong for using plain arrays instead of iterable #1884

Copy link
Copy link
Open
@antonkulaga

Description

@antonkulaga
Issue body actions

I am having trouble with using OrderedMap(someArray) in typescript. Typical errors are like:

 Overload 1 of 2, '(collection?: Iterable<[string, number]> | undefined): OrderedMap<string, number>', gave the following error.
        Argument of type '(string | number)[][]' is not assignable to parameter of type 'Iterable<[string, number]>'.

This types of problems are valid for all arrays I tried, including Array<Array>.
While working in pure JS and sometimes with typescript in the browser it provides type errors for typescript on nodejs because OrderedMap does not have an overload for arrays. Please, improve type-script types in immutable js!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.