Skip to content

Commit cec7875

Browse files
davidaureliofacebook-github-bot
authored andcommitted
amend babel definitions to allow inline plugins without configuration
Summary: Updates babel flow defs to allow for inline plugins without configuration arguments. Reviewed By: jeanlauliac Differential Revision: D4442217 fbshipit-source-id: 1b4392bf13977d97984c72cff65b28e62f602300
1 parent c9ad000 commit cec7875

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

flow/babel.js.flow

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ type GeneratorOptions = {
4949
sourceFileName?: string,
5050
};
5151

52-
type InlinePlugin = [string | {} | () => {}, any];
52+
type InlinePlugin = string | {} | () => {};
5353

5454
// based on https://babeljs.io/docs/usage/options/ -- 2016-11-11
5555
type __TransformOptions = {
5656
filename?: string,
5757
filenameRelative?: string,
5858
presets?: Array<string | Object>,
59-
plugins?: Array<string | Object | InlinePlugin>,
59+
plugins?: Array<string | Object | [InlinePlugin] | [InlinePlugin, mixed]>,
6060
parserOpts?: BabylonOptions,
6161
generatorOpts?: GeneratorOptions,
6262
highlightCode?: boolean,

packager/react-packager/src/ModuleGraph/worker/optimize-module.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ function optimize(transformed, file, originalCode, options): TransformResult {
7171
}
7272

7373
function optimizeCode(code, map, filename, inliningOptions) {
74-
/* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error
75-
* detected during the deployment of v0.38.0. To see the error, remove this
76-
* comment and run flow
77-
*/
7874
return babel.transform(code, {
7975
plugins: [
8076
[constantFolding],

0 commit comments

Comments
 (0)