UNPKG

@rr0/cms

Version:

RR0 Content Management System (CMS)

18 lines (17 loc) 827 B
import { Datasource } from "./Datasource.js"; import { HtmlRR0Context } from "../../RR0Context.js"; import { ContextFilter } from "./ContextFilter.js"; /** * Cache cases which were already fetched, and filter out cases in memory according to (time) context. */ export declare abstract class AbstractDatasource<S> implements Datasource<S> { readonly authors: string[]; readonly copyright: string; protected readonly cases: Map<string, S[]>; protected constructor(authors: string[], copyright: string); getCases(context: HtmlRR0Context): Promise<S[]>; fetch(context: HtmlRR0Context): Promise<S[]>; protected createFilter(context: HtmlRR0Context): ContextFilter<S>; protected contextKey(context: HtmlRR0Context): string; protected abstract readCases(context: HtmlRR0Context): Promise<S[]>; }