Prettier 1.15.1
Sorry, I could not reproduce it on v1.15.2 playground. 🙇 (solved at 1.15.2 ? 👀)
Playground link
In flow, I can typecast with the following, not type-assertion.
Input:
type Props = {|
...$Exact<PropsWithTFn>,
...$Exact<$Call<typeof mapStateToProps, *, *>>,
...$Exact<$Call<typeof mapDispatch, *, *>>,
...$Exact<withResponse.WithQueryProps<RootQuery>>,
|};
However, this gets error message below in prettier 1.15.1
Replace `<$Call<typeof·mapDispatch,·*,·*>>` with `/*::·<$Call/*::·<typeof·mapDispatch,·*,·*>·*/>·*/`
Output:
type Props = {|
...$Exact<PropsWithTFn>,
...$Exact/*:: <$Call/*:: <typeof·mapStateToProps, *, *>*/> */
...$Exact/*:: <$Call/*:: <typeof mapDispatch, *, *>*/> */,
...$Exact/*:: <withResponse.WithQueryProps<RootQuery>*/> */,
|};
Expected behavior:
type Props = {|
...$Exact<PropsWithTFn>,
...$Exact<$Call<typeof mapStateToProps, *, *>>,
...$Exact<$Call<typeof mapDispatch, *, *>>,
...$Exact<withResponse.WithQueryProps<RootQuery>>,
|};
Prettier 1.15.1
Sorry, I could not reproduce it on v1.15.2 playground. 🙇 (solved at 1.15.2 ? 👀)
Playground link
In flow, I can typecast with the following, not type-assertion.
Input:
However, this gets error message below in prettier 1.15.1
Output:
Expected behavior: