import { LoaderType } from '../Constants'; import { TDestroyable, TNoSpread, TWithId } from '../../Mixins'; import { Observable } from 'rxjs'; import { TAbstractLoadedResourcePack } from './TAbstractLoadedResourcePack'; import { TAbstractOnLoadFunction } from './TAbstractOnLoadFunction'; import { TAbstractResourceAsyncRegistry } from './TAbstractResourceAsyncRegistry'; import { TAbstractResourceConfig } from './TAbstractResourceConfig'; import { TAbstractSimpleRegistry } from './TAbstractSimpleRegistry'; export type TAbstractLoader, M extends TAbstractSimpleRegistry> = Readonly<{ type: LoaderType; loadAsync: (config: RC) => Promise; loadListAsync: (configs: ReadonlyArray) => Promise>; loadFromConfigAsync: (configs: ReadonlyArray) => Promise>; setOnLoadedFn: (onLoaded: TAbstractOnLoadFunction, options?: RC['options']) => void; loaded$: Observable>; getRegistry: () => R; getMetaInfoRegistry: () => M; }> & TWithId & TDestroyable & TNoSpread;