Fix sourceMap flow annotations by making them nullable

Reviewed By: mjesun

Differential Revision: D5755671

fbshipit-source-id: 19be8475b1f1b54bc55b64a1de4b8a446e125c65
This commit is contained in:
Rafael Oleza 2017-09-04 13:42:30 -07:00 committed by Facebook Github Bot
parent 2377f04f4a
commit 9c251076cf
3 changed files with 9 additions and 9 deletions

View File

@ -110,8 +110,8 @@ export type PostProcessModules = (
export type PostMinifyProcess = ({
code: string,
map: MappingsMap,
}) => {code: string, map: MappingsMap};
map: ?MappingsMap,
}) => {code: string, map: ?MappingsMap};
export type PostProcessBundleSourcemap = ({
code: Buffer | string,

View File

@ -93,8 +93,8 @@ class Transformer {
minify: (
filename: string,
code: string,
sourceMap: MappingsMap,
) => Promise<{code: string, map: MappingsMap}>;
sourceMap: ?MappingsMap,
) => Promise<{code: string, map: ?MappingsMap}>;
constructor(
transformModulePath: string,

View File

@ -32,8 +32,8 @@ import type {GlobalTransformCache} from '../lib/GlobalTransformCache';
type MinifyCode = (
filePath: string,
code: string,
map: MappingsMap,
) => Promise<{code: string, map: MappingsMap}>;
map: ?MappingsMap,
) => Promise<{code: string, map: ?MappingsMap}>;
type ContainsTransformerOptions = {+transformer: JSTransformerOptions};
@ -225,7 +225,7 @@ class Resolver {
resolutionResponse: ResolutionResponse<Module, T>,
module: Module,
name: string,
map: MappingsMap,
map: ?MappingsMap,
code: string,
meta?: {
dependencyOffsets?: Array<number>,
@ -263,8 +263,8 @@ class Resolver {
}: {
path: string,
code: string,
map: MappingsMap,
}): Promise<{code: string, map: MappingsMap}> {
map: ?MappingsMap,
}): Promise<{code: string, map: ?MappingsMap}> {
return this._minifyCode(path, code, map);
}