perspectives: added data provider layer

This commit is contained in:
Jan Prochazka
2022-07-21 11:26:44 +02:00
parent 6e6d0bb616
commit 1abfab950e
7 changed files with 77 additions and 19 deletions

View File

@@ -0,0 +1,14 @@
import { PerspectiveDataLoadProps } from './PerspectiveTreeNode';
export interface PerspectiveDataCache {}
export class PerspectiveDataProvider {
constructor(
public cache: PerspectiveDataCache,
public setCache: (value: PerspectiveDataCache) => void,
public loader: (props: PerspectiveDataLoadProps) => Promise<any[]>
) {}
async loadData(props: PerspectiveDataLoadProps) {
return await this.loader(props);
}
}