Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mouton-rebelle opened this issue Jun 19, 2023 · 1 comment
Open
Labels

Comments

@mouton-rebelle
Copy link

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

@jdeniau
Copy link
Member

jdeniau commented Jun 20, 2023

Hi @mouton-rebelle ,

There is no plan for the maintainer team to improve / fix the flow definition file. We try to maintain de TypeScript one, and it is complex already.

We welcome PR, as small as they may be though, that will improve the flow typing (you can see some merged PR for flow)

@jdeniau jdeniau added the flow label Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants