Fix flow in assetTransformer

Differential Revision: D6592751

fbshipit-source-id: a0e08656bc830db1186df0249a01b8d2695c121e
This commit is contained in:
Rafael Oleza 2017-12-20 14:18:21 -08:00 committed by Facebook Github Bot
parent a66e1f71f6
commit 98ff5c785e
3 changed files with 6 additions and 3 deletions

View File

@ -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,

View File

@ -47,7 +47,7 @@ export type TransformArgs<ExtraOptions: {}> = {|
|};
export type TransformResults = {
ast: ?Ast,
ast: Ast,
};
export type Transform<ExtraOptions: {}> = (

View File

@ -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,