flow-runtime icon indicating copy to clipboard operation
flow-runtime copied to clipboard

Support Flow ReadOnlyArray type

Open selimeneserd opened this issue 6 months ago • 0 comments

Summary

  • Map Flow's $ReadOnlyArray<T> built-in to the runtime array(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 build
  • TEST_FILTER='199-support' yarn --cwd packages/babel-plugin-flow-runtime test
  • yarn --cwd packages/babel-plugin-flow-runtime build
  • yarn --cwd packages/babel-plugin-flow-runtime test -> 238 passing
  • yarn --cwd packages/babel-plugin-flow-runtime lint exits 0 with existing jsx-a11y/alt-text warnings
  • git diff --check

selimeneserd avatar May 11 '26 06:05 selimeneserd