Does Parcel support stripping Flow types from code?
This would be handled by Babel, which parcel will run for you automatically. To strip flow types:
# Install Babel Transform
npm install --save-dev babel-plugin-transform-flow-strip-types
// Add to .babelrc
{
"plugins": ["transform-flow-strip-types"]
}
Reference: https://babeljs.io/docs/plugins/transform-flow-strip-types/
Thanks Brandon!
This is production error in js file. :fu:
:hocho:
index.js
// @flow
export interface BaseAction {
type: string;
}
export interface Action<Payload> extends BaseAction {
+payload: Payload;
error?: boolean;
}
export interface ActionMeta<Payload, Meta> extends Action<Payload> {
meta: Meta;
}
export type Dispatch = (action: Action<*> | Promise<Action<*>>) => Promise<*>;
@FDiskas Show babel config.
Most helpful comment
Thanks Brandon!