UNPKG

harperdb

Version:

HarperDB is a distributed database, caching service, streaming broker, and application development platform focused on performance and ease of use.

41 lines (40 loc) 1.68 kB
import { EventEmitter } from 'node:events'; import { type Server } from '../server/Server.ts'; import { EntryHandler, type onEntryEventHandler } from './EntryHandler.ts'; import { OptionsWatcher } from './OptionsWatcher.ts'; import type { Resources } from '../resources/Resources.ts'; import type { FileAndURLPathConfig } from './Component.ts'; import { FilesOption } from './deriveGlobOptions.ts'; export declare class MissingDefaultFilesOptionError extends Error { constructor(); } /** * This class is what is passed to the `handleApplication` function of an extension. * * It is imperative that the instance is "ready" before its passed to the `handleApplication` function * so that the developer can immediately start using `scope.options`, etc. * */ export declare class Scope extends EventEmitter { #private; options: OptionsWatcher; resources: Resources; server: Server; ready: Promise<any[]>; constructor(name: string, directory: string, configFilePath: string, resources: Resources, server: Server); get logger(): any; get name(): string; get directory(): string; get configFilePath(): string; close(): this; handleEntry(files: FilesOption | FileAndURLPathConfig, handler: onEntryEventHandler): EntryHandler; handleEntry(handler: onEntryEventHandler): EntryHandler; handleEntry(): EntryHandler; requestRestart(): void; /** * Wait for all entry handlers' initial loads to complete. * This includes waiting for any async operations in entry handler callbacks. * Called by the component loader after handleApplication completes. */ waitForInitialLoads(): Promise<void>; }