CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-flow-remove-types

Fast, zero-configuration Flow type annotation removal tool for JavaScript with CLI and programmatic APIs

84

1.09x
Overview
Eval results
Files

task.mdevals/scenario-1/

Flow Type Development Environment

A development utility that sets up an automatic Flow type transformation environment for a Node.js project, allowing developers to execute Flow-typed JavaScript files seamlessly without manual build steps.

Capabilities

Configure automatic type transformation

  • It registers a transformation hook that automatically processes required modules @test
  • It enables transformation for files without explicit Flow pragmas when configured @test

Execute Flow-typed modules

  • It successfully executes a module with Flow type annotations after registering the hook @test
  • It executes multiple Flow-typed modules with different type annotations @test

Apply custom file filtering

  • It transforms only files matching a custom include pattern @test
  • It excludes files matching a custom exclude pattern from transformation @test

Implementation

@generates

API

/**
 * Sets up the Flow type transformation environment.
 * Registers the require hook with the specified options to enable
 * automatic transformation of Flow-typed JavaScript files.
 *
 * @param {Object} options - Configuration options for the transformation hook
 * @param {boolean} [options.all] - Transform all files, not just those with @flow pragma
 * @param {RegExp|string} [options.includes] - Pattern for files to include in transformation
 * @param {RegExp|string} [options.excludes] - Pattern for files to exclude from transformation
 * @returns {void}
 */
function setupFlowEnvironment(options = {}) {
  // IMPLEMENTATION HERE
}

module.exports = { setupFlowEnvironment };

Dependencies { .dependencies }

flow-remove-types { .dependency }

Provides automatic Flow type transformation through require hooks.

Install with Tessl CLI

npx tessl i tessl/npm-flow-remove-types

tile.json