FLOW-REMOVE-TYPES(1)

πŸ“¦
version 1.2.3 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’… flow-remove-types β€” bestie edition

okay so. you've got this JavaScript file, right, and it's got Flow types all up in it (you know, @flow, the whole thing), and you need to ship it somewhere that does NOT speak Flow. that's literally the entire job of flow-remove-types, a User Commands legend living in section 1 of your manual. it takes your typed-up JS and strips the types right out. slay. πŸ¦‹


✨ SYNOPSIS ✨

flow-remove-types [options] [sources]

that's it. that's the whole vibe. options and then some sources. πŸŽ€


πŸ”₯ OPTIONS πŸ”₯

  • -h, --help β€” shows you this very message. the "help me help you" of flags. 🫢
  • -v, --version β€” prints out the current version of flow-remove-types. cute little flex.
  • -i, --ignore β€” paths to ignore, written as a Regular Expression. like a little velvet rope for your files. 🚫
  • -x, --extensions β€” file extensions to transform. tell it which ones get the treatment.
  • -o, --out-file β€” the file path to write the transformed file to. one in, one out. πŸ’–
  • -d, --out-dir β€” the directory path to write transformed files within. drop 'em all in one folder, queen.
  • -a, --all β€” transform all files, not just the ones with a @flow comment. no invite needed, everybody's coming. ✨
  • -p, --pretty β€” removes flow types without replacing them with spaces, which produces prettier output, but may require using source maps. gorgeous but high-maintenance, iykyk. πŸ’…
  • -m, --sourcemaps β€” also outputs source map files. you can optionally pass "inline" if that's the energy you're on.
  • -q, --quiet β€” produces no output about successful progress. she's mysterious. she's silent. she's working. 🀫
lowkey important: --pretty gives you the prettiest output but might need source maps to keep things trackable. don't skip that part bestie, it's not decoration. 😭

🌈 EXAMPLES 🌈

transform one file πŸ“

flow-remove-types --out-file output.js input.js

one file in, one file out. main character behavior.

transform many files πŸ‘‘

flow-remove-types --out-dir out/ input1.js input2.js

several files, all landing in out/. the group chat is thriving.

transform files in a directory πŸŽ€

flow-remove-types --out-dir out/ indir/

point it at a whole directory, no cap.

transform files with source maps πŸ—ΊοΈ

flow-remove-types --out-dir out/ indir/ --sourcemaps

transform files with inline source maps ✨

flow-remove-types --out-dir out/ indir/ --sourcemaps inline

same thing but the source maps are inline. inline. say it with me. inline. πŸ’…

transform stdin 🌸

cat input.js | flow-remove-types > output.js

pipe it in, pipe it out. the classic glow-up pipeline. πŸ¦‹


ngl, if you're piping from stdin and want the result somewhere, redirect it β€” > is your bestie here. and remember --pretty might want source maps. fr fr.

okay that's the whole page!! this gorgeous thing is flow-remove-types v1.2.3, dated November 2022, and yes it's the FLOW-REMOVE-TYPES(1) manual page β€” periodt. go strip some types, you're doing amazing sweetie πŸ’–πŸ§šβœ¨

πŸ“¦ where this page comes from