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

View File

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

View File

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

View File

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