UNPKG

@rr0/cms

Version:

RR0 Content Management System (CMS)

21 lines (20 loc) 880 B
import { HtmlRR0Context } from "../RR0Context.js"; import { HttpSource, TimeService } from "../time/index.js"; import { SourceFactory } from "./SourceFactory.js"; import { AllDataService, RR0SourceType, Source } from "@rr0/data"; /** * Create Source objects and register them. */ export declare class SourceRegistry extends SourceFactory { registry: {}; constructor(dataService: AllDataService, http: HttpSource, baseUrl: string, options: Intl.DateTimeFormatOptions, time: TimeService); /** * Create a Source object from an anchor's URL. * * @param context * @param href The anchor's URL string. */ createExternal(context: HtmlRR0Context, href: string): Promise<Source<RR0SourceType>>; protected get(href: string): Promise<Source<RR0SourceType>>; protected register(href: string, source: Source<RR0SourceType>): Promise<void>; }