function printValueDetails
printValueDetails(
argument: string
): Promise<string | null>

The whole of a value: a function's entire declaration, body included, or anything else rendered all the way down rather than summarised to a line. null where there is no such name. What .view prints.

The body opens with the signature, so this does NOT also print the signature separately — a .view that did would print it twice.

import { printValueDetails } from './value-details.ts';

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

// Defined, not invoked: it asks a live page where something came from.
function example(repl: ReplContext) {
  return printValueDetails(repl, 'double'); // the same, with the function's body in place of its head
}

null is the interesting return: .view takes it as "not a value after all" and goes on to try the same name as a path, which is how one command answers three kinds of question.

Parameters

argument: string

Return Type

Promise<string | null>

Usage

import { printValueDetails } from "lib/commands/repl/value-details.ts";