mirror of https://github.com/status-im/metro.git
Only added @format and @flow the rest is Prettier
Reviewed By: rafeca Differential Revision: D6702012 fbshipit-source-id: 98b8cc45132334fc20e0f92d7ee4111198d0a95f
This commit is contained in:
parent
ca525f0e8d
commit
70858589ff
|
@ -5,6 +5,9 @@
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the BSD-style license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
*
|
||||||
|
* @flow
|
||||||
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
type _SourceMap = {
|
type _SourceMap = {
|
||||||
|
@ -25,9 +28,17 @@ type BabylonOptions = {
|
||||||
sourceType?: 'script' | 'module',
|
sourceType?: 'script' | 'module',
|
||||||
sourceFilename?: 'string',
|
sourceFilename?: 'string',
|
||||||
plugins?: Array<
|
plugins?: Array<
|
||||||
'jsx' | 'flow' | 'doExpressions' | 'objectRestSpread' | 'decorators' |
|
| 'jsx'
|
||||||
'classProperties' | 'exportExtensions' | 'asyncGenerators' |
|
| 'flow'
|
||||||
'functionBind' | 'functionSent' | 'dynamicImport'
|
| 'doExpressions'
|
||||||
|
| 'objectRestSpread'
|
||||||
|
| 'decorators'
|
||||||
|
| 'classProperties'
|
||||||
|
| 'exportExtensions'
|
||||||
|
| 'asyncGenerators'
|
||||||
|
| 'functionBind'
|
||||||
|
| 'functionSent'
|
||||||
|
| 'dynamicImport',
|
||||||
>,
|
>,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -50,7 +61,7 @@ type GeneratorOptions = {
|
||||||
sourceFileName?: string,
|
sourceFileName?: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
type InlinePlugin = string | {} | () => {};
|
type InlinePlugin = string | {} | (() => {});
|
||||||
type _Plugins = Array<string | Object | [InlinePlugin] | [InlinePlugin, mixed]>;
|
type _Plugins = Array<string | Object | [InlinePlugin] | [InlinePlugin, mixed]>;
|
||||||
|
|
||||||
// based on https://babeljs.io/docs/usage/options/ -- 2016-11-11
|
// based on https://babeljs.io/docs/usage/options/ -- 2016-11-11
|
||||||
|
@ -87,8 +98,9 @@ type __TransformOptions = {
|
||||||
extends?: string,
|
extends?: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
type _TransformOptions =
|
type _TransformOptions = __TransformOptions & {
|
||||||
__TransformOptions & {env?: {[key: string]: __TransformOptions}};
|
env?: {[key: string]: __TransformOptions},
|
||||||
|
};
|
||||||
|
|
||||||
type Ast = {};
|
type Ast = {};
|
||||||
|
|
||||||
|
@ -117,8 +129,11 @@ declare module 'babel-core' {
|
||||||
): TransformResult;
|
): TransformResult;
|
||||||
declare function traverse<State>(
|
declare function traverse<State>(
|
||||||
ast: Ast,
|
ast: Ast,
|
||||||
visitor: {[key: string]: VisitFn<State> |
|
visitor: {
|
||||||
{enter?: VisitFn<State>, exit?: VisitFn<State>}},
|
[key: string]:
|
||||||
|
| VisitFn<State>
|
||||||
|
| {enter?: VisitFn<State>, exit?: VisitFn<State>},
|
||||||
|
},
|
||||||
scope?: ?Object,
|
scope?: ?Object,
|
||||||
state?: State,
|
state?: State,
|
||||||
parentPath?: ?Object,
|
parentPath?: ?Object,
|
||||||
|
@ -145,5 +160,5 @@ declare module 'babel-generator' {
|
||||||
ast: Ast,
|
ast: Ast,
|
||||||
options?: GeneratorOptions,
|
options?: GeneratorOptions,
|
||||||
code?: string | {[string]: string},
|
code?: string | {[string]: string},
|
||||||
) => GeneratorResult;
|
) => GeneratorResult
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue