Gulp plugin that converts flow-typed javascripts into typescript files.
- Converts
.jsx
or.js
with jsx tag to.tsx
. - Converts
.js
to.ts
if no jsx tag is found. - Converts
mixed
type toany
- Converts
import type
statement toimport
- Converts
?
tovoid | OtherType
- Removes
@flow
pragma - Converts
React.Node
toReact.ReactNode
const FlowToTs = require('gulp-flow-to-ts');
gulp.task('convert', () => {
gulp.src('./src/**')
.pipe(FlowToTs())
.pipe(gulp.dest('./src-ts'));
});