facebook / facebook/relay

Compiler: Flow Enums with Unknown Members instead of `"%future added value"`

Open
#3,596 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

I've been reading through the new [Flow Enums](https://flow.org/en/docs/enums/) documentation and one thing that caught my attention was [enums with unknown members](https://flow.org/en/docs/enums/defining-enums/#toc-flow-enums-with-unknown-members). In short:

```js
enum Status {
Active,
Paused,
Off,
...
}
```

Specifically the last sentence:

> One use case for this would be the JS output of [GraphQL Enums](https://graphql.org/learn/schema/#enumeration-types): Flow Enums with unknown members could be used instead of the added `'%future added value'` member.

So my question/feature request is: are you considering this? Would you consider it?

Thanks! 😎

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.