Usage

Prefetch an authenticated image.

tsx
// Prefetch an authenticated image.
import { image, type PrefetchOptions } from 'kuito';

const memoryOnly: PrefetchOptions = { cache: 'memory' };

await image.prefetch(
  { uri: 'https://example.com/avatar.png', headers: { Authorization: 'Bearer token' } },
  memoryOnly,
);

Type declaration

ts
export interface PrefetchOptions {
  /** The caches the image fills; `memory-disk` by default, as on an Image. */
  cache?: PrefetchCache;
}

Members 1

NameTypeRequiredDescription
cachePrefetchCacheNoThe caches the image fills; memory-disk by default, as on an Image.
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.