gitwtfhub

wtf is flow-remove-types?

yyx990803/flow-remove-types — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2016-10-04

4JavaScriptAudience · developerComplexity · 2/5DormantSetup · easy

TL;DR

A lightweight tool that strips Flow type annotations from JavaScript files, leaving clean code that runs in Node.js or browsers.

Mindmap

mindmap
  root((flow-remove-types))
    What it does
      Strips Flow type annotations
      Outputs clean JavaScript
      Preserves line numbers
    Tech stack
      JavaScript
      Node.js
      Flow
    Use cases
      Run Flow-annotated code
      Lightweight Babel alternative
      Build script integration
    Audience
      Developers using Flow
    Features
      CLI and function API
      Node.js REPL replacement
      Require hook support

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Strip Flow type annotations from a directory of files before shipping to production.

REASON 2

Use as a require hook to run Flow-annotated code directly without a build step.

REASON 3

Swap out a heavier Babel setup for a faster, leaner type-stripping tool.

What's in the stack?

JavaScriptNode.jsFlow

How it stacks up

yyx990803/flow-remove-typesarata-ae/purupurupngtubercarrycooldude/nova-ide
Stars444
LanguageJavaScriptJavaScriptJavaScript
Last pushed2016-10-04
MaintenanceDormant
Setup difficultyeasymoderate
Complexity2/53/5
Audiencedevelopergeneralvibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Wtf does this do

Flow is a tool that lets JavaScript developers add type annotations to their code, basically, explicit notes about what kind of data a function should receive or what a variable should contain. These annotations help catch bugs early and make code clearer to read. However, those annotations aren't valid JavaScript, so they need to be stripped out before the code actually runs. This tool does exactly that: it takes JavaScript files with Flow type annotations and removes them, leaving behind clean, standard JavaScript that Node.js or browsers can execute. It's designed as a lightweight alternative to Babel, a popular but heavier tool that does type stripping as just one of many features. If you're only interested in removing Flow types and not doing other code transformations, this tool gets you there much faster with fewer dependencies to download. You can use it from the command line to convert individual files or entire directories, or you can call it as a JavaScript function within your own build scripts. The README also mentions that it works as a Node.js REPL replacement and as a require hook, so you can even run Flow-annotated code directly without a separate build step. The magic of how it works is that when it removes types, it replaces them with whitespace rather than actually deleting them, that way, line numbers and character positions stay the same, which makes the output easier to debug and means it plays nicely with existing build tools. The project's main selling point is speed and simplicity. The README includes performance benchmarks showing that installing it is about seven times faster than installing Babel plus its Flow plugin, and transforming files is more than twice as fast. If you're building a Node.js project that uses Flow and you don't need Babel for other reasons, this is a much leaner choice.

Yoink these prompts

Prompt 1
Show me how to use flow-remove-types from the command line to strip types from my project.
Prompt 2
Explain how to set up flow-remove-types as a require hook so I can run Flow code directly.
Prompt 3
Compare using flow-remove-types versus Babel's Flow plugin for my Node.js project.

Frequently asked questions

wtf is flow-remove-types?

A lightweight tool that strips Flow type annotations from JavaScript files, leaving clean code that runs in Node.js or browsers.

What language is flow-remove-types written in?

Mainly JavaScript. The stack also includes JavaScript, Node.js, Flow.

Is flow-remove-types actively maintained?

Dormant — no commits in 2+ years (last push 2016-10-04).

How hard is flow-remove-types to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is flow-remove-types for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.