Commit 0c7e323e authored by Emanuel Quimper's avatar Emanuel Quimper Committed by Dylan Vann

Add cache enum types.

parent b8c82c7d
......@@ -16,6 +16,12 @@ declare namespace FastImage {
type stretch = 'stretch'
type center = 'center'
}
namespace cache {
type cacheOnly = 'cacheOnly'
type immutable = 'immutable'
type web = 'web'
}
export type Priority =
FastImage.priority.low |
......@@ -27,12 +33,18 @@ declare namespace FastImage {
FastImage.resizeMode.cover |
FastImage.resizeMode.stretch |
FastImage.resizeMode.center
export type Cache =
FastImage.cache.cacheOnly |
FastImage.cache.immutable |
FastImage.cache.web
}
export type FastImageSource = {
uri?: string
headers?: {[key: string]: string}
priority?: FastImage.Priority
cache?: FastImage.Cache
}
export interface ImageStyle extends FlexStyle, TransformsStyle, ShadowStyleIOS {
......@@ -112,6 +124,12 @@ interface FastImageStatic extends React.ComponentClass<FastImageProperties> {
normal: FastImage.priority.normal
high: FastImage.priority.high
}
cache: {
cacheOnly: FastImage.cache.cacheOnly
immutable: FastImage.cache.immutable
web: FastImage.cache.web
}
preload(sources: FastImageSource[]): void
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment