mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
packager: getAssetDataFromName: @flow
Reviewed By: davidaurelio Differential Revision: D4921247 fbshipit-source-id: 47c516257cde5de6b69604d714e45310d00afe19
This commit is contained in:
committed by
Facebook Github Bot
parent
47f834a76d
commit
2403b42cf9
@@ -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;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user