Fix babel-generator Flow definition

Reviewed By: rafeca

Differential Revision: D6692040

fbshipit-source-id: d15709b1d1f6a3d8e9befbf17e44623838eef033
This commit is contained in:
Peter van der Zee 2018-01-10 03:06:38 -08:00 committed by Facebook Github Bot
parent 2ab9c268b1
commit 0a9b45e01c

View File

@ -102,7 +102,7 @@ type TransformResult = {
type GeneratorResult = {
code: string,
map: ?_SourceMap,
rawMappings: ?Array<RawMapping>,
rawMappings: ?Array<_RawMapping>,
};
type VisitFn = <State>(path: Object, state: State) => any;
@ -131,7 +131,7 @@ declare module 'babel-core' {
): TransformResult;
}
type RawMapping = {
type _RawMapping = {
generated: {column: number, line: number},
name?: string,
original?: {column: number, line: number},
@ -140,10 +140,10 @@ type RawMapping = {
// https://github.com/babel/babel/tree/master/packages/babel-generator
declare module 'babel-generator' {
declare type RawMapping = RawMapping;
declare module.exports: {default: (
declare export type RawMapping = _RawMapping;
declare export default (
ast: Ast,
options?: GeneratorOptions,
code?: string | {[string]: string},
) => GeneratorResult};
) => GeneratorResult;
}