Function parameters can also have defaults. This is a feature of ECMAScript 2015.
function method(value: string = "default") { /* ... */ }
In addition to their set type, default parameters can also be void or omitted altogether. However, they cannot be null.
// @flow
function acceptsOptionalString(value: string = "foo") {
// ...
}
acceptsOptionalString("bar");
acceptsOptionalString(undefined);
acceptsOptionalString(null);
acceptsOptionalString();
https://flow.org/en/docs/types/primitives/#toc-function-parameters-with-defaults