babel-plugin-transform-flow-enums

Babel transform for Flow Enums.

MIT 2 个版本
安装
npm install babel-plugin-transform-flow-enums
yarn add babel-plugin-transform-flow-enums
pnpm add babel-plugin-transform-flow-enums
bun add babel-plugin-transform-flow-enums
README

babel-plugin-transform-flow-enums

This Babel transform turns Flow Enums EnumDeclaration nodes into calls to the Flow Enums runtime.

This plugin requires the Flow syntax plugin, with {enums: true} enabled.

Read more about how to enable Flow Enums in your project.

Options

  • getRuntime:
    • Optional function. Called with Babel types as the first argument.
    • If supplied, will be called to produce a Babel AST node which will be a reference to the Flow Enums runtime.
    • If omitted, require('flow-enums-runtime') will be used.
版本列表
0.0.2 2021-09-13
0.0.1 2020-12-10