variable command

.locals — what the stopped frame can see, which is not what the session declared.

import { command as localsCommand } from './locals.ts';

import type { ReplContext } from '../command.ts';

// Defined, not invoked: it writes to a live prompt.
function example(repl: ReplContext) {
  return localsCommand.main(repl, ''); // the stopped frame's own names
}

Type

Usage

import { command } from "lib/commands/repl/commands/locals.ts";