diff --git a/docs/plugin-transform-flow-comments.md b/docs/plugin-transform-flow-comments.md index 19755e52fe..fbfbaa64ec 100644 --- a/docs/plugin-transform-flow-comments.md +++ b/docs/plugin-transform-flow-comments.md @@ -72,3 +72,13 @@ require("@babel/core").transform("code", { }); ``` +## Options + +### `requireDirective` + +`boolean`, defaults to `false`. + +Setting this to true will only convert flow annotations and declarations from files +that contain the `// @flow` directive. It will also throw errors for any Flow +annotations found in files without the directive. +