piral-base
Version:
The base library for creating a Piral instance.
15 lines (14 loc) • 670 B
TypeScript
import type { DefaultLoaderConfig, PiletLoader, CustomSpecLoaders } from './types';
/**
* Extends the default loader with the spec loaders, if any are given.
* @param fallback The loader to use if none of the spec loaders matches.
* @param specLoaders The spec loaders to use.
* @returns The loader.
*/
export declare function extendLoader(fallback: PiletLoader, specLoaders: CustomSpecLoaders | undefined): PiletLoader;
/**
* Gets the default loader provided by piral-base.
* @param config The loader configuration.
* @returns The function to load a pilet from its entry.
*/
export declare function getDefaultLoader(config?: DefaultLoaderConfig): PiletLoader;