expo-cached-image
Version:
Super fast cached image component for react-native applications powered by expo
39 lines • 1.09 kB
TypeScript
import { File } from 'expo-file-system';
import React from 'react';
import { ImageProps, ImageURISource } from 'react-native';
type CachedImageProps = Omit<ImageProps, 'source'> & {
cacheKey: string;
source: Omit<ImageURISource, 'uri'> & {
uri: string;
expiresIn?: number;
};
placeholderContent?: React.ReactNode;
};
declare const CachedImage: React.FC<CachedImageProps>;
export declare const CacheManager: {
addToCache: ({ file, key }: {
file: string;
key: string;
}) => Promise<string>;
getCachedUri: ({ key }: {
key: string;
}) => Promise<string>;
downloadAsync: ({ uri, key, options }: {
uri: string;
key: string;
options: {
headers?: Record<string, string>;
};
}) => Promise<File>;
getMetadata: ({ key }: {
key: string;
}) => Promise<{
exists: true;
size: number;
modificationTime: Date;
uri: string;
isDirectory: boolean;
} | null>;
};
export default CachedImage;
//# sourceMappingURL=index.d.ts.map