packager: getAssetDataFromName: @flow

Reviewed By: davidaurelio

Differential Revision: D4921247

fbshipit-source-id: 47c516257cde5de6b69604d714e45310d00afe19
This commit is contained in:
Jean Lauliac authored and Facebook Github Bot committed 2017-04-20 07:35:15 -07:00
1 parent 47f834a76d
commit 2403b42cf9
5 files changed
+29 -14

No files matched your search

@@ -46,12 +46,12 @@ const platforms = new Set(defaults.platforms);
*/
function getFakeModuleMap(hasteMap: HasteMap) {
return {
getModule(name: string, platform_: string): ?string {
const module = hasteMap.getModule(name, platform_);
getModule(name: string, platform: ?string): ?string {
const module = hasteMap.getModule(name, platform);
return module && module.type === 'Module' ? module.path : null;
},
getPackage(name: string, platform_: string): ?string {
const module = hasteMap.getModule(name, platform_);
getPackage(name: string, platform: ?string): ?string {
const module = hasteMap.getModule(name, platform);
return module && module.type === 'Package' ? module.path : null;
},
};