summarizeValue(repl: ReplContext,argument: string): Promise<string | null>
Enough to recognise a value by: where it is written, what was written above it, and its
signature. null where this session knows nothing by that name. What .doc prints.
In the order a file has them — where it is, what was said about it, then the thing itself. A value with no comment still has the other two, which is the difference between "here it is" and the "nothing written about it" this used to answer.
import { summarizeValue } 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 summarizeValue(repl, 'double'); // 'test/fixtures/repl-helpers.ts:15\nDoubles a number…\nexport function double(…)' }
repl: ReplContext