Skip to content

mattapet/flow-to-ts-vscode-runner

Repository files navigation

flow-to-ts-vscode-runner

A simple Visual Studio Code extension for running already existing CLI tools for migrating Flow to Typescript right from the editor.

CLI Tools Integrated

Features

Converting files

Converts a single file from Flow to Typescript. Files with .jsx extension will generate .tsx files.

Requirements:

  • @khanacademy/flow-to-ts

Convert Flow file to Typescript

Converting directories

Converts all within the specified directory Flow files from Flow to Typescript recursively. Files with .jsx extension will generate .tsx files.

Requirements:

  • @khanacademy/flow-to-ts

Convert Directory file to Typescript

Generating Typescript definitions from Flow

No support for JSX

Generates Typescript definitions (.d.ts) for a given flow file.

Requirements:

  • @khanacademy/flow-to-ts
  • Typescript compiler (tsc)

Generate Typescript definitions from Flow

Generating Flow definitions from Typescript

No support for JSX

Generates Flow definitions (.js.flow) for Typescript (.ts), or Typescript definition (.d.ts) file.

Requirements:

  • flowgen

Generate Flow definitions from Typescript

Extension settings

Key Description
flow-to-ts-runner.tscPath Path to the Typescript compiler binary (e.g., /usr/local/bin/tsc). Defaults to local, i.e., ./node_modules/.bin/tsc
flow-to-ts-runner.flow-to-tsPath Path to the @khanacademy/flow-to-ts binary (e.g., /usr/local/bin/flow-to-ts). Defaults to local, i.e., ./node_modules/.bin/flow-to-ts
flow-to-ts-runner.flowgenPath Path to the flowgen binary (e.g., /usr/local/bin/flowgen). Defaults to local, i.e., ./node_modules/.bin/flowgen

About

flow-to-ts runner for Visual Studio Code

Resources

Stars

Watchers

Forks

Packages

No packages published