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,
|
||||
hot?: boolean,
|
||||
generateSourceMaps?: boolean,
|
||||
}): Promise<Array<Module>> {
|
||||
}): Promise<Array<string>> {
|
||||
return this.getTransformOptions(rootEntryFile, {
|
||||
enableBabelRCLookup: this._opts.enableBabelRCLookup,
|
||||
dev,
|
||||
|
|
|
@ -109,7 +109,7 @@ class Resolver {
|
|||
getShallowDependencies(
|
||||
entryFile: string,
|
||||
transformOptions: JSTransformerOptions,
|
||||
): Promise<Array<Module>> {
|
||||
): Promise<Array<string>> {
|
||||
return this._depGraph.getShallowDependencies(entryFile, transformOptions);
|
||||
}
|
||||
|
||||
|
|
|
@ -336,7 +336,7 @@ class Server {
|
|||
return this._bundler.hmrBundle(options, host, port);
|
||||
}
|
||||
|
||||
getShallowDependencies(options: DependencyOptions): Promise<Array<Module>> {
|
||||
getShallowDependencies(options: DependencyOptions): Promise<Array<string>> {
|
||||
return Promise.resolve().then(() => {
|
||||
const platform =
|
||||
options.platform != null
|
||||
|
|
|
@ -210,7 +210,7 @@ class DependencyGraph extends EventEmitter {
|
|||
getShallowDependencies(
|
||||
entryPath: string,
|
||||
transformOptions: JSTransformerOptions,
|
||||
): Promise<Array<Module>> {
|
||||
): Promise<Array<string>> {
|
||||
return this._moduleCache
|
||||
.getModule(entryPath)
|
||||
.getDependencies(transformOptions);
|
||||
|
|
Loading…
Reference in New Issue