forked from VideoSpike/nativescript-web-image-cache
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.d.ts
55 lines (45 loc) · 1.08 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { View } from 'tns-core-modules/ui/core/view';
export class WebImage extends View {
/**
* Image src, either res://, http://, ~/... or absolute path
*/
src: string;
/**
* Is the image loading or not?
*/
isLoading: boolean;
/**
* aspectFit, aspectFill, fill or none
*/
stretch: string;
/**
* Native android object
*/
android: any /* com.facebook.drawee.view.SimpleDraweeView */;
/**
* Native ios object
*/
ios: any /* UIImageView */;
}
/**
* Clear cached images
*/
export function clearCache(): void;
/**
* For android only: initialize to use cache
*/
export function initialize(): void;
/**
* To initialize the plugin on angular for both android and iOS
*/
export function initializeOnAngular(): void;
/**
* To set the number of days in which to expire cache
* @param days : limit of the cache
*/
export function setCacheLimit(days: number): void;
/**
* To prefetch images to allow loading before using the images
* @param days : array of URLs to prefetch
*/
export function preFetchImage(urls:Array<string>) : Promise<void>;