This tool provides support in the conversion process of converting AtlasKit Flow components to TypeScript. It takes the trivial work out of the conversion.
Homepage Repository PyPI Python
pip install flowtees==0.1.9
This tool provides support in the conversion process of converting AtlasKit Flow components to TypeScript. It takes the trivial work out of the conversion. These are just floaties to help you but won't totally convert your component.
tsx/ts
node_modules
@flow
, $StringLitteral
, $FlowFixMe
)type
keyword from exports and importstype
keyword to interface
keyword when applicable and can handle extends
package.json
and creates tsconfig.json
filesFlowTees is a command line application, called flowtees
, the application is used before beginning the conversion process. It assumes that no work has been started on the component yet.
To begin, run the following command:
$ flowtees [directory/to/component]
e.g. say you are converting the select
component, then the command would look like this:
$ flowtees ~/src/atlaskit-mk-2/packages/core/select
The program will begin analyzing the js
files in the directory and do a dry run to find only compatible files to convert. The compatible files will be listed in green while incompatible files will be shown in red.
After processing the files, you will get a prompt asking whether you want to also include the build config files for TS. This helps to create the appropriate tsconfig.json
files in the component directory and also modify the the package.json
file so it points to the correct index.ts
file.
If you only have Python3 installed on your computer then the following command will install the program:
$ pip install flowtees
If you have both Python2 and Python3 installed then the following command will be more suitable:
$ pip3 install flowtees
import React from 'react'
will be made by default to reflect on choice to standardize on non-namespace import, however existing --react-namespace
will remain in placeimport React from 'react';
to import * as React from 'react';
to avoid future issues. (Thi can be turned off with --react-namespace option)js
filetsconfig.json
tsx/ts
node_modules
@flow
, $StringLitteral
, $FlowFixMe
)type
keyword from exports and importstype
keyword to interface
keyword when applicable and can handle extends
package.json
and creates tsconfig.json
files