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 = ({
|
export type PostMinifyProcess = ({
|
||||||
code: string,
|
code: string,
|
||||||
map: MappingsMap,
|
map: ?MappingsMap,
|
||||||
}) => {code: string, map: MappingsMap};
|
}) => {code: string, map: ?MappingsMap};
|
||||||
|
|
||||||
export type PostProcessBundleSourcemap = ({
|
export type PostProcessBundleSourcemap = ({
|
||||||
code: Buffer | string,
|
code: Buffer | string,
|
||||||
|
|
|
@ -93,8 +93,8 @@ class Transformer {
|
||||||
minify: (
|
minify: (
|
||||||
filename: string,
|
filename: string,
|
||||||
code: string,
|
code: string,
|
||||||
sourceMap: MappingsMap,
|
sourceMap: ?MappingsMap,
|
||||||
) => Promise<{code: string, map: MappingsMap}>;
|
) => Promise<{code: string, map: ?MappingsMap}>;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
transformModulePath: string,
|
transformModulePath: string,
|
||||||
|
|
|
@ -32,8 +32,8 @@ import type {GlobalTransformCache} from '../lib/GlobalTransformCache';
|
||||||
type MinifyCode = (
|
type MinifyCode = (
|
||||||
filePath: string,
|
filePath: string,
|
||||||
code: string,
|
code: string,
|
||||||
map: MappingsMap,
|
map: ?MappingsMap,
|
||||||
) => Promise<{code: string, map: MappingsMap}>;
|
) => Promise<{code: string, map: ?MappingsMap}>;
|
||||||
|
|
||||||
type ContainsTransformerOptions = {+transformer: JSTransformerOptions};
|
type ContainsTransformerOptions = {+transformer: JSTransformerOptions};
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ class Resolver {
|
||||||
resolutionResponse: ResolutionResponse<Module, T>,
|
resolutionResponse: ResolutionResponse<Module, T>,
|
||||||
module: Module,
|
module: Module,
|
||||||
name: string,
|
name: string,
|
||||||
map: MappingsMap,
|
map: ?MappingsMap,
|
||||||
code: string,
|
code: string,
|
||||||
meta?: {
|
meta?: {
|
||||||
dependencyOffsets?: Array<number>,
|
dependencyOffsets?: Array<number>,
|
||||||
|
@ -263,8 +263,8 @@ class Resolver {
|
||||||
}: {
|
}: {
|
||||||
path: string,
|
path: string,
|
||||||
code: string,
|
code: string,
|
||||||
map: MappingsMap,
|
map: ?MappingsMap,
|
||||||
}): Promise<{code: string, map: MappingsMap}> {
|
}): Promise<{code: string, map: ?MappingsMap}> {
|
||||||
return this._minifyCode(path, code, map);
|
return this._minifyCode(path, code, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue