flow
flow copied to clipboard
Bridge the syntax gap between _Flow_ and _TypeScript_
Proposal
The goal of this proposal is to improve interoperability between Flow and TypeScript.
- [ ] Allow
export declare
as an alias ofdeclare export
- [x] Add
unknown
type as an alias ofmixed
- [x] Add
undefined
type as an alias ofvoid
- [x] Add
readonly
as an alias of+
in object type and interface. e.g.type Person = { readonly name: string }
. - [x] Add
in
,out
as aliases of-
and+
for type parameter variance - [x] Add
extends
as an alias of:
for type parameter bounds. e.g.function f<A extends string>(a:A){}
. - [x] Add
never
type as an alias ofempty
- [x] Add type guards
(x: unknown) => x is X
- [x] Add
as
type assertion as an alias of(:)
- [x] Add
keyof T
as an alias of$Keys<T>
- [x] Add readonly arrays
readonly string[]
- [x] Add readonly tuples
readonly [string, number]
- [X] Add
Readonly
,ReadonlyArray
,ReadonlySet
,ReadonlyMap
,Record<K, V>
as aliases of$ReadOnly
,$ReadOnlyArray
,$ReadOnlySet
,$ReadOnlyMap
,{ [key: K]: V }
- [x] Add
Partial
,Required
utility types
Use case
I would like to use Flow. However, it is hard to give up all TypeScript tooling. More interoperability could help to use Flow.