UNPKG

744 BPlain TextView Raw
1import { ResourceAdapter } from './ResourceAdapter';
2import { TaskList } from './TaskList';
3import { BaseResource, BaseResourceOptions } from './types';
4
5export interface ResourceAdapterOptions {
6 readonly name: string;
7 readonly dataPath: string;
8}
9
10export interface ResourceDependency {
11 readonly plugin: string;
12 readonly resourceType: string;
13 readonly name: string;
14}
15
16export interface MasterResourceAdapter<Resource extends BaseResource, ResourceOptions extends BaseResourceOptions> {
17 readonly initResourceAdapter: (
18 options: ResourceAdapterOptions,
19 ) => Promise<ResourceAdapter<Resource, ResourceOptions>>;
20
21 readonly createResourceAdapter: (adapterOptions: ResourceAdapterOptions, options: ResourceOptions) => TaskList;
22}