mirror of https://github.com/status-im/metro.git
Fix sourceMap flow annotations by making them nullable
Reviewed By: mjesun Differential Revision: D5755671 fbshipit-source-id: 19be8475b1f1b54bc55b64a1de4b8a446e125c65
This commit is contained in:
parent
2377f04f4a
commit
9c251076cf
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue