String Enum concatenation
Aperta
feature request
- Lingua principale
- Rust
- Stelle
- 22.3k
- Fork
- 1.9k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hi,
It would be great to be able to concat string enum type like
```js
type ActionTypes = {
fetch: 'FETCH_' + Name
}
typeof ActionTypes<'MY_NAME'> // { fetch: 'FETCH_MY_NAME' }
type Types = ActionTypes<'MY_NAME'>;
typeof $PropertyType; // 'FETCH_MY_NAME'
```
Is it conceivable ?
My use case is to be able to [generate redux action creators and keep strong typing and type refinement in the reducer](https://stackoverflow.com/questions/45697967/make-the-flow-type-refinement-works-in-a-reducer-for-generated-actions).
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.