Fast, zero-configuration Flow type annotation removal tool for JavaScript with CLI and programmatic APIs
84
Build a tool that transforms Flow-typed JavaScript files by removing type annotations and generating source maps for debugging.
Your tool should accept Flow-typed JavaScript source code and produce two outputs:
The transformation should completely remove type annotations rather than replacing them with whitespace, producing clean output suitable for production deployment.
@generates
/**
* Transforms Flow-typed JavaScript source code by removing type annotations
* and generating a source map.
*
* @param {string} sourceCode - The Flow-typed JavaScript source code
* @returns {Object} An object with two properties:
* - code: The transformed JavaScript as a string
* - sourceMap: The v3 format source map object
*/
function transformWithSourceMap(sourceCode) {
// IMPLEMENTATION HERE
}
module.exports = { transformWithSourceMap };Provides Flow type annotation removal with source map generation support.
Install with Tessl CLI
npx tessl i tessl/npm-flow-remove-typesevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10