UNPKG

webserv

Version:

a quick, flexible, fully typed development server

14 lines (13 loc) 669 B
import { Service } from 'src/core/app'; export interface Environment { configPath: string; properties?: { [key: string]: any; }; } export declare function isEnvironment(value: any): value is Environment; export declare type ServiceLoaderResult = Promise<Service | Service[]> | Service | Service[]; export declare type SimpleServiceLoader<C = any> = (config: C) => ServiceLoaderResult; export declare type ServiceLoader<C = any> = (config: C, env: Environment) => ServiceLoaderResult; export declare function setLoader(name: string, handler: ServiceLoader | string): void; export declare function getLoader(name: string): ServiceLoader;