New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-flow2ts

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-flow2ts

Babel plugin to convert Flow into TypeScript

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-flow-to-typescript

Babel plugin to convert Flow code into TypeScript

How to use

$ yarn global add @babel/cli 
$ yarn add babel-plugin-flow2ts

# you must use babel@^7.x.x
$ babel --version 
7.0.0-beta.44 (@babel/core 7.0.0-beta.44)

$ babel --plugins babel-plugin-flow2ts ${SRC_FLOW_FILE} -o ${DEST_TS_FILE}

Implementation status

Supported?SyntaxFlowTypeScript
Maybe typelet a:?numberlet a: number | null | undefined
Void typevoidvoid
Mixed typemixed{}
Function type(A, B) => C(a: A, b: B) => C
Exact type{| a: A |}{ a: A }
Indexers{ [A]: B }{ [a: A]: B }
Existential typeMap<*, *>Map<any, any>
Opaque typesopaque type A = Btype A = B
Varianceinterface A { +b: B, -c: C }interface A { readonly b: B, c: C }
Type parameter boundsfunction f<A: string>(a:A){}function f<A extends string>(a:A){}
Cast(a: A)(a as A)
type/typeof importimport type A from 'module'import A from 'module'
$Keys$Keys<X>keyof X
$Values$Values<X>X[keyof X]
$ReadOnly$Readonly<X>Readonly<X>
$Exact$Exact<X>X
$Diff$Diff<X, Y>Pick<X, Exclude<keyof X, keyof Y>>
$PropertyType$PropertyType<T, k>T[k]
$ElementType$ElementType<T, k>T[k]
  • add CLI

Keywords

FAQs

Package last updated on 13 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc