mirror of https://github.com/status-im/metro.git
Fix flow in assetTransformer
Differential Revision: D6592751 fbshipit-source-id: a0e08656bc830db1186df0249a01b8d2695c121e
This commit is contained in:
parent
a66e1f71f6
commit
98ff5c785e
|
@ -89,7 +89,9 @@ type __TransformOptions = {
|
|||
|
||||
type _TransformOptions =
|
||||
__TransformOptions & {env?: {[key: string]: __TransformOptions}};
|
||||
declare class Ast {}
|
||||
|
||||
type Ast = {};
|
||||
|
||||
type TransformResult = {
|
||||
ast: Ast,
|
||||
code: ?string,
|
||||
|
@ -101,7 +103,7 @@ type VisitFn = <State>(path: Object, state: State) => any;
|
|||
declare module 'babel-core' {
|
||||
declare type Plugins = _Plugins;
|
||||
declare type SourceMap = _SourceMap;
|
||||
declare type Ast = Ast;
|
||||
declare type Ast = {};
|
||||
declare type TransformOptions = _TransformOptions;
|
||||
declare function transform(
|
||||
code: string,
|
||||
|
|
|
@ -47,7 +47,7 @@ export type TransformArgs<ExtraOptions: {}> = {|
|
|||
|};
|
||||
|
||||
export type TransformResults = {
|
||||
ast: ?Ast,
|
||||
ast: Ast,
|
||||
};
|
||||
|
||||
export type Transform<ExtraOptions: {}> = (
|
||||
|
|
|
@ -15,6 +15,7 @@ const {getAssetData} = require('./Assets');
|
|||
const {generateAssetCodeFileAst} = require('./Bundler/util');
|
||||
|
||||
import type {TransformOptions} from './JSTransformer/worker';
|
||||
import type {Ast} from 'babel-core';
|
||||
|
||||
type Params = {
|
||||
localPath: string,
|
||||
|
|
Loading…
Reference in New Issue