Kind: Class
Source: packages/core/repl/native-functions/debug-repl-fn.ts
Part of: Core
DebugReplFn is a native REPL function that provides a debug-oriented command within the core REPL environment. Its action() method performs the command's behavior when the function is invoked by the REPL command dispatcher.
Extends: ReplFunction
Methods
| Method | Signature | Returns |
|---|---|---|
action | `action(moduleCls: Type | string)` |
Properties
| Property | Type |
|---|---|
fnDefinition | ReplFnDefinition |
Where it refuses work
DebugReplFnstops the work with an early return when!moduleEntry.DebugReplFnstops the work with an early return whencollectionEntries.length <= 0.
Diagram
mermaidgraph LR User[REPL user] --> Parser[REPL command parser] Parser --> Dispatcher[Native function dispatcher] Dispatcher --> DebugReplFn[DebugReplFn] DebugReplFn --> Action[action(): void] Action --> DebugOutput[Debug behavior/output]
Usage
tsimport { DebugReplFn } from './native-functions/debug-repl-fn';
// Typically invoked by the REPL's native-function dispatcher.
const debugCommand = new DebugReplFn();
debugCommand.action();
AI Coding Instructions
- Keep
action()focused on the behavior of the debug REPL command; avoid placing command parsing logic in this class. - Integrate
DebugReplFnthrough the existing native-function registration and dispatch flow rather than calling it directly from unrelated application code. - Preserve the
voidreturn contract ofaction()and route observable results through the REPL's established output or logging mechanisms. - Treat this function as a developer-facing REPL capability; avoid exposing sensitive runtime state unless the surrounding debug conventions explicitly allow it.
Was this page helpful?