mirror of https://github.com/status-im/metro.git
packager: ResolutionRequest: stronger option typing
Reviewed By: cpojer Differential Revision: D4906382 fbshipit-source-id: 1696c3e7fe07c84a3a497740dc87a237d9b71d1e
This commit is contained in:
parent
e18d213116
commit
aa3be70fb9
|
@ -112,7 +112,6 @@ exports.createResolveFn = function(options: ResolveOptions): ResolveFn {
|
||||||
entryPath: '',
|
entryPath: '',
|
||||||
extraNodeModules,
|
extraNodeModules,
|
||||||
hasteFS,
|
hasteFS,
|
||||||
hasteMap,
|
|
||||||
helpers,
|
helpers,
|
||||||
matchFiles: filesByDirNameIndex.match.bind(filesByDirNameIndex),
|
matchFiles: filesByDirNameIndex.match.bind(filesByDirNameIndex),
|
||||||
moduleCache,
|
moduleCache,
|
||||||
|
|
|
@ -59,19 +59,19 @@ type ModuleishCache<TModule, TPackage> = {
|
||||||
|
|
||||||
type MatchFilesByDirAndPattern = (dirName: string, pattern: RegExp) => Array<string>;
|
type MatchFilesByDirAndPattern = (dirName: string, pattern: RegExp) => Array<string>;
|
||||||
|
|
||||||
type Options<TModule, TPackage> = {
|
type Options<TModule, TPackage> = {|
|
||||||
dirExists: DirExistsFn,
|
+dirExists: DirExistsFn,
|
||||||
entryPath: string,
|
+entryPath: string,
|
||||||
extraNodeModules: ?Object,
|
+extraNodeModules: ?Object,
|
||||||
hasteFS: HasteFS,
|
+hasteFS: HasteFS,
|
||||||
helpers: DependencyGraphHelpers,
|
+helpers: DependencyGraphHelpers,
|
||||||
matchFiles: MatchFilesByDirAndPattern,
|
+matchFiles: MatchFilesByDirAndPattern,
|
||||||
moduleCache: ModuleishCache<TModule, TPackage>,
|
+moduleCache: ModuleishCache<TModule, TPackage>,
|
||||||
moduleMap: ModuleMap,
|
+moduleMap: ModuleMap,
|
||||||
platform: string,
|
+platform: string,
|
||||||
platforms: Set<string>,
|
+platforms: Set<string>,
|
||||||
preferNativePlatform: boolean,
|
+preferNativePlatform: boolean,
|
||||||
};
|
|};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* It may not be a great pattern to leverage exception just for "trying" things
|
* It may not be a great pattern to leverage exception just for "trying" things
|
||||||
|
|
Loading…
Reference in New Issue