mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Rewrote image-cache to use the native image caching features, i.e. LruCache and NSCache.
This commit is contained in:
8
ui/image-cache/image-cache.d.ts
vendored
8
ui/image-cache/image-cache.d.ts
vendored
@@ -20,7 +20,7 @@ declare module "ui/image-cache" {
|
||||
/**
|
||||
* An optional function to be called when the download is complete.
|
||||
*/
|
||||
completed?: (result: imageSource.ImageSource, key: string) => void;
|
||||
completed?: (image: any, key: string) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,11 +57,11 @@ declare module "ui/image-cache" {
|
||||
/**
|
||||
* Gets the image for the specified key. May be undefined if the key is not present in the cache.
|
||||
*/
|
||||
get(key: string): imageSource.ImageSource;
|
||||
get(key: string): any;
|
||||
/**
|
||||
* Sets the image for the specified key.
|
||||
*/
|
||||
set(key: string, source: imageSource.ImageSource): void;
|
||||
set(key: string, image: any): void;
|
||||
/**
|
||||
* Removes the cache for the specified key.
|
||||
*/
|
||||
@@ -73,7 +73,7 @@ declare module "ui/image-cache" {
|
||||
|
||||
//@private
|
||||
_downloadCore(request: DownloadRequest);
|
||||
_onDownloadCompleted(key: string, result: imageSource.ImageSource);
|
||||
_onDownloadCompleted(key: string, image: any);
|
||||
//@endprivate
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user