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 abe7a2a9f1
commit a6439279ff
1 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ type PackagerServer<TModule> = {
): Promise<HMRBundle>,
getDependencies(options: DependencyOptions): Promise<ResolutionResponse<TModule>>,
getModuleForPath(entryFile: string): Promise<TModule>,
getShallowDependencies(options: DependencyOptions): Promise<Array<TModule>>,
getShallowDependencies(options: DependencyOptions): Promise<Array<string>>,
setHMRFileChangeListener(listener: ?(type: string, filePath: string) => mixed): void,
};
@ -85,7 +85,7 @@ function attachHMRServer<TModule: Moduleish>(
bundleEntry: string,
dependenciesCache: Array<string>,
dependenciesModulesCache: {[mixed]: TModule},
shallowDependencies: {[string]: Array<TModule>},
shallowDependencies: {[string]: Array<string>},
inverseDependenciesCache: mixed,
|};
@ -107,7 +107,7 @@ function attachHMRServer<TModule: Moduleish>(
async function getDependencies(platform: string, bundleEntry: string): Promise<{
dependenciesCache: Array<string>,
dependenciesModulesCache: {[mixed]: TModule},
shallowDependencies: {[string]: Array<TModule>},
shallowDependencies: {[string]: Array<string>},
inverseDependenciesCache: mixed,
resolutionResponse: ResolutionResponse<TModule>,
}> {
@ -129,7 +129,7 @@ function attachHMRServer<TModule: Moduleish>(
const deps: Array<{
path: string,
name?: string,
deps: Array<TModule>,
deps: Array<string>,
}> = await Promise.all(response.dependencies.map(async (dep: TModule) => {
const depName = await dep.getName();