async function main() {
  const newContentByFile = await generateBabelFlowLibraryDefinitions();
  await Promise.all(
    Array.from(newContentByFile.entries(), ([path, content]) =>
      fsPromises.writeFile(path, content),
    ),
  );
}
This script updates all flow types. Run it every time you upgrade babel