Skip to content

Conversation

koba04
Copy link
Contributor

@koba04 koba04 commented Nov 2, 2016

This PR is to update Flowtype version to v0.34.0 and fix some errors.

In Flowtype v0.34.0, dictionary types are treated as invariant.

In the following case, it has to explicit covariance with +.

  • ReactNativeAttributePayload.js
type AttributeConfiguration =
  { [key: string]: (
    CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
  ) };

But I avoid the error by using $FlowFixMe comment because it's needed some works like this.

  1. The covariant syntax(+) causes a parse error in ESLint.
  2. To fix it, we have to update babylon for parse covariant syntax with +.
  3. 2. causes other ESLint errors, which are no-undef for type parameters.
  4. To fix them, We have to use eslint-plugin-flowtype.
  5. To install eslint-plugin-flowtype, We have to update ESLint to >=2.0.0 because of peerDependencies.
  6. 5. causes other ESLint errors, We have to fix them.

Can I work on this?
If so, I'll work on this as other PRs.

@chicoxyzzy
Copy link
Contributor

IMO it's worth it

@koba04
Copy link
Contributor Author

koba04 commented Nov 11, 2016

resolved by #8259

@koba04 koba04 closed this Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants