Functions

f
blockAt(
source: string,
line: number
): string

A whole declaration — its first line through the } that closes it.

f
commentAbove(
source: string,
line: number
): string[]

The comment written directly above a line, with its markers taken off.

f
renderDoc(
lines: readonly string[],
palette: Theme
): string

A comment as the prompt should print it: prose muted, and the examples in it read as code.

f
signature(
source: string,
line: number
): string

The declaration a line starts, up to where its body begins.