UNPKG

1.04 kBTypeScriptView Raw
1import { INestApplicationContext, InjectionToken, Logger } from '@nestjs/common';
2import { ReplFunction } from './repl-function';
3import type { ReplFunctionClass } from './repl.interfaces';
4type ModuleKey = string;
5export type ModuleDebugEntry = {
6 controllers: Record<string, InjectionToken>;
7 providers: Record<string, InjectionToken>;
8};
9type ReplScope = Record<string, any>;
10export declare class ReplContext {
11 readonly app: INestApplicationContext;
12 readonly logger: Logger;
13 debugRegistry: Record<ModuleKey, ModuleDebugEntry>;
14 readonly globalScope: ReplScope;
15 readonly nativeFunctions: Map<string, ReplFunction<unknown[], any>>;
16 private readonly container;
17 constructor(app: INestApplicationContext, nativeFunctionsClassRefs?: ReplFunctionClass[]);
18 writeToStdout(text: string): void;
19 private initializeContext;
20 private introspectCollection;
21 private stringifyToken;
22 private addNativeFunction;
23 private registerFunctionIntoGlobalScope;
24 private initializeNativeFunctions;
25}
26export {};