mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 03:26:07 +00:00
Fix flow types of getShallowDependencies()
Reviewed By: mjesun Differential Revision: D5735278 fbshipit-source-id: b9a2797a89a3893a5196ef8fe15d2ab8aa00e544
This commit is contained in:
parent
abe7a2a9f1
commit
a6439279ff
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user