0
関数の戻り値の型をvoidに変更する必要があります。flowtype:関数をvoid型に戻す
例えば:
import { func_one } from './examples';
// FuncOneType is a function type with the same signature
// as func_one.
type FuncOneType = typeof func_one;
// FuncOneTypeWithoutReturn is similar to FuncOneType but
// the return type is void. This works.
const func_one_void = (...args) => {func_one(...args)};
type FuncOneTypeVoidReturn = typeof func_one_void;
// I need something like to avoid the intermediate
// function func_one_void. How can I achieve this?
type FuncOneTypeVoidReturn = $Arguments<func_one> => void;