Kind: Class
Source: packages/core/repl/native-functions/methods-repl-fn.ts
Part of: Core
MethodsReplFn is a native REPL function responsible for handling the methods command/action within the core REPL environment. Its action() method performs the command’s behavior, allowing the REPL to expose method-related information through the native-function system.
Extends: ReplFunction
Methods
| Method | Signature | Returns |
|---|---|---|
action | `action(token: Type | string)` |
Properties
| Property | Type |
|---|---|
fnDefinition | ReplFnDefinition |
Diagram
mermaidgraph LR User[REPL User] --> Command[methods command] Command --> MethodsReplFn[MethodsReplFn] MethodsReplFn --> Action[action()] Action --> Output[REPL Output]
Usage
tsimport { MethodsReplFn } from './packages/core/repl/native-functions/methods-repl-fn';
const methodsCommand = new MethodsReplFn();
// Execute the native REPL command behavior.
methodsCommand.action();
AI Coding Instructions
- Keep command-specific behavior inside
action()so it remains compatible with the REPL native-function dispatch flow. - Follow the conventions used by other classes in
packages/core/repl/native-functions/when adding output, validation, or context access. - Avoid placing interactive input parsing in this class unless other native functions use the same pattern; parsing is typically handled by the REPL command layer.
- When changing displayed method information, ensure the output remains useful for interactive REPL users and consistent with related help or introspection commands.
Was this page helpful?