mirror of https://github.com/status-im/metro.git
Fix flow types of getShallowDependencies()
Reviewed By: mjesun Differential Revision: D5735278 fbshipit-source-id: b9a2797a89a3893a5196ef8fe15d2ab8aa00e544
This commit is contained in:
parent
21cc11c5ae
commit
909480887e
|
@ -580,7 +580,7 @@ class Bundler {
|
||||||
minify?: boolean,
|
minify?: boolean,
|
||||||
hot?: boolean,
|
hot?: boolean,
|
||||||
generateSourceMaps?: boolean,
|
generateSourceMaps?: boolean,
|
||||||
}): Promise<Array<Module>> {
|
}): Promise<Array<string>> {
|
||||||
return this.getTransformOptions(rootEntryFile, {
|
return this.getTransformOptions(rootEntryFile, {
|
||||||
enableBabelRCLookup: this._opts.enableBabelRCLookup,
|
enableBabelRCLookup: this._opts.enableBabelRCLookup,
|
||||||
dev,
|
dev,
|
||||||
|
|
|
@ -109,7 +109,7 @@ class Resolver {
|
||||||
getShallowDependencies(
|
getShallowDependencies(
|
||||||
entryFile: string,
|
entryFile: string,
|
||||||
transformOptions: JSTransformerOptions,
|
transformOptions: JSTransformerOptions,
|
||||||
): Promise<Array<Module>> {
|
): Promise<Array<string>> {
|
||||||
return this._depGraph.getShallowDependencies(entryFile, transformOptions);
|
return this._depGraph.getShallowDependencies(entryFile, transformOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -336,7 +336,7 @@ class Server {
|
||||||
return this._bundler.hmrBundle(options, host, port);
|
return this._bundler.hmrBundle(options, host, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
getShallowDependencies(options: DependencyOptions): Promise<Array<Module>> {
|
getShallowDependencies(options: DependencyOptions): Promise<Array<string>> {
|
||||||
return Promise.resolve().then(() => {
|
return Promise.resolve().then(() => {
|
||||||
const platform =
|
const platform =
|
||||||
options.platform != null
|
options.platform != null
|
||||||
|
|
|
@ -210,7 +210,7 @@ class DependencyGraph extends EventEmitter {
|
||||||
getShallowDependencies(
|
getShallowDependencies(
|
||||||
entryPath: string,
|
entryPath: string,
|
||||||
transformOptions: JSTransformerOptions,
|
transformOptions: JSTransformerOptions,
|
||||||
): Promise<Array<Module>> {
|
): Promise<Array<string>> {
|
||||||
return this._moduleCache
|
return this._moduleCache
|
||||||
.getModule(entryPath)
|
.getModule(entryPath)
|
||||||
.getDependencies(transformOptions);
|
.getDependencies(transformOptions);
|
||||||
|
|
Loading…
Reference in New Issue