@babel/preset-flow

    In

    Out

    1. function foo(one, two, three) {}
    1. npm install --save-dev @babel/preset-flow
    1. babel --presets @babel/preset-flow script.js
    1. presets: ["@babel/preset-flow"],
    2. });

    boolean, defaults to false.

    If you are using the all option in your Flow config, be sure to set this option to true to get matching behavior.

    For example, without either of the above set, the following call expression with a type argument:

    Would get parsed as a nested binary expression:

    When enabled, type-only class fields are only removed if they are prefixed with the declare modifier:

    1. class A {
    2. declare foo: string; // Removed
    3. bar: string; // Initialized to undefined

    You can read more about configuring preset options