Provide option for `casting_syntax=as` for `relay.config.js` when `language` is `flow`
Open
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
We’d like to enable `casting_syntax=as` in our project’s `.flowconfig`, however the generated Flow types from the Relay compiler use the old `:` syntax, resulting in thousands of `invalid-type-cast-syntax` errors, which makes it difficult to identify the cases in our codebase that require updating.
It would be nice if there were an option for `relay.config.js` where we could opt-in to the new syntax, as it will eventually [become the default](https://medium.com/flow-type/new-type-casting-syntax-for-flow-as-3ef41567ff3e).
> At some point in the future we will remove the option and only support “as” casts, so code update your codebase!
Thanks for looking!
Contributor guide
Assessment
This issue has not been assessed yet.