import { AssetType } from './enums'; import { Progress } from './core/progress'; export type BatchAsset = string | { [name: string]: string; }; export interface AssetRecord { url: string; name: string; type: Type; asset: AssetResources[Type]; } export interface AssetResources { [AssetType.Font]: string; [AssetType.Image]: HTMLImageElement; [AssetType.Audio]: HTMLAudioElement; [AssetType.Json]: T; } export interface AssetsBatchOptions { assets: BatchAsset[]; onLoad?: (name: string, progress: Progress) => void; onComplete?: (progress: Progress) => void; onError?: (url: string, error: Error) => void; }