import { ImageSourcePropType } from 'react-native'; import { ItemCollection, Registry, RegistryInputItem, RegistryItem } from './Registry'; export interface AssetRegistryItemExtras { type: 'audio' | 'photo' | 'video' | 'unknown'; preload: boolean; } export type RequireSource = ImageSourcePropType; export type AssetValue = RequireSource; export type Asset = RegistryItem & AssetRegistryItemExtras; export type AssetInput = RegistryInputItem; export type AssetCollection = ItemCollection; /** * 🖼 AssetRegistry */ export declare class AssetRegistry extends Registry { /** * Resolves an Asset. * @param keys */ resolve(...keys: string[]): Asset | undefined; /** * Convert any input value to an item. This is where you transform inputs and add defualts * @param key * @param partial */ protected createItem(key: string, partial: any): Asset; /** * Typeguard to check a given object is a registry value * @param value */ protected isValue(value: any): value is Asset['value']; /** * Typeguard to check a given object is an input value * @param value */ protected isInputValue(value: any): value is AssetInput['value']; }