flow-runtime
flow-runtime copied to clipboard
Support Flow ReadOnlyArray type
Summary
- Map Flow's
$ReadOnlyArray<T>built-in to the runtimearray(T)type instead of falling through to an object/ref conversion. - Add a regression fixture for the issue example so
$ReadOnlyArray<string | number>asserts an array of the expected union type.
Fixes #199
IssueHunt bounty: https://issuehunt.io/r/gajus/flow-runtime/issues/199
Testing
yarn --cwd packages/flow-config-parser buildTEST_FILTER='199-support' yarn --cwd packages/babel-plugin-flow-runtime testyarn --cwd packages/babel-plugin-flow-runtime buildyarn --cwd packages/babel-plugin-flow-runtime test-> 238 passingyarn --cwd packages/babel-plugin-flow-runtime lintexits 0 with existingjsx-a11y/alt-textwarningsgit diff --check