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.
Features
Converting files
Converts a single file from Flow to Typescript. Files with .jsx extension will generate .tsx files.
Requirements:
Converting directories
Converts all within the specified directory Flow files from Flow to Typescript recursively. Files with .jsx extension will generate .tsx files.
Requirements:
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 )
Generating Flow definitions from Typescript
No support for JSX
Generates Flow definitions (.js.flow ) for Typescript (.ts ), or Typescript definition (.d.ts ) file.
Requirements:
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 |
| |