amis-rpc-design/node_modules/babel-plugin-transform-flow-enums
2023-10-07 19:42:30 +08:00
..
__tests__ v1.0.0 2023-10-07 19:42:30 +08:00
CHANGELOG.md v1.0.0 2023-10-07 19:42:30 +08:00
index.js v1.0.0 2023-10-07 19:42:30 +08:00
LICENSE v1.0.0 2023-10-07 19:42:30 +08:00
package.json v1.0.0 2023-10-07 19:42:30 +08:00
README.md v1.0.0 2023-10-07 19:42:30 +08:00

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.