UNPKG

piral-base

Version:

The base library for creating a Piral instance.

16 lines (15 loc) 846 B
import type { PiletRequester, PiletLoader, PiletEntries, Pilet } from './types'; /** * Loads the pilets metadata and puts them in the cache, if provided. * @param fetchPilets The function to resolve the pilets. * @param cache The optional cache to use initially and update later. */ export declare function loadMetadata(fetchPilets: PiletRequester): Promise<PiletEntries>; /** * Loads the pilets by first getting them, then evaluating the raw content. * @param fetchPilets The function to resolve the pilets. * @param fetchDependency A function to fetch the dependencies. By default, `fetch` is used. * @param dependencies The availablly global dependencies, if any. * @returns A promise leading to the evaluated pilets. */ export declare function loadPilets(fetchPilets: PiletRequester, loadPilet: PiletLoader): Promise<Array<Pilet>>;