f
blockAt(): string
source: string,
line: number
A whole declaration — its first line through the } that closes it.
f
commentAbove(): string[]
source: string,
line: number
The comment written directly above a line, with its markers taken off.
f
renderDoc(): string
lines: readonly string[],
palette: Theme
A comment as the prompt should print it: prose muted, and the examples in it read as code.
f
signature(): string
source: string,
line: number
The declaration a line starts, up to where its body begins.
Usage
import * as mod from "lib/repl/docs.ts";