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

Flow type definition outdated, not working with last year changes  #1943

Copy link
Copy link
Open
@mouton-rebelle

Description

@mouton-rebelle
Issue body actions

What happened

Updating Flow to 0.193 breaks Immutable static collection creator

How to reproduce

I tried to build a PR, but just upgrading flow to 0.193 on this repo raises 19 errors.
The problematic use case for me : I can no longer use static method to create my collection, due to changes to flow empty array / object behavior...

My simple test case :

// @flow

import * as Immutable from 'immutable'

type Person = {| name: string |}
type ListOfPerson = Immutable.List<Person>
const createdFromClassConstructor: ListOfPerson = new Immutable.List<Person>()

const toto: Person = { name: 'toto' }
const arrayOfToto: $ReadOnlyArray<Person> = [toto]

const createdFormStatic: ListOfPerson = Immutable.List(arrayOfToto)

Any plans to fix the library definition to support more recent flow versions ?

Thanks a lot

Metadata

Metadata

Assignees

No one assigned

    Labels

    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.