amis-rpc-design/node_modules/rc-image/lib/hooks/useStatus.d.ts

14 lines
369 B
TypeScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
type ImageStatus = 'normal' | 'error' | 'loading';
export default function useStatus({ src, isCustomPlaceholder, fallback, }: {
src: string;
isCustomPlaceholder?: boolean;
fallback?: string;
}): readonly [(img?: HTMLImageElement) => void, {
src: string;
onLoad?: undefined;
} | {
onLoad: () => void;
src: string;
}, ImageStatus];
export {};