ask
ask(
words,code?,limit?):string
A question about something in code, worded the way a drop-down shows it: the words
lead, as a question, and the code they’re about sits under them in its own type. A
blip in attention whose line ends in code gets that drop-down.
ask("Run the test suite", "npm test") // "Run the test suite? `npm test`"ask("Edit client.ts", "src/client.ts") // "Edit client.ts? `src/client.ts`"The code is its first line (a script or a heredoc reads as its opening line and “…”),
clipped at limit. A backtick in it becomes a look-alike (ˋ), and the words lose
theirs, so nothing can end the code early or split the line.
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
words |
string |
undefined |
code? |
string |
undefined |
limit? |
number |
70 |
Returns
Section titled “Returns”string