Fix flow types of getShallowDependencies()

Reviewed By: mjesun

Differential Revision: D5735278

fbshipit-source-id: b9a2797a89a3893a5196ef8fe15d2ab8aa00e544
This commit is contained in:
Rafael Oleza 2017-08-30 08:12:41 -07:00 committed by Facebook Github Bot
parent 21cc11c5ae
commit 909480887e
4 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -109,7 +109,7 @@ class Resolver {
getShallowDependencies(
entryFile: string,
transformOptions: JSTransformerOptions,
): Promise<Array<Module>> {
): Promise<Array<string>> {
return this._depGraph.getShallowDependencies(entryFile, transformOptions);
}

View File

@ -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

View File

@ -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);