You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ Properties you can pass to the console element
58
58
| complete? | (words: string[], cursor: number, prompt: string)=>string[] | Return a list of possible completions given a list of (`words`), index of the word containing the cursor (`cursor`) , and the full prompt text (`prompt`).
59
59
| continue? | (prompt: string)=>bool | Return a boolean indicating whether to continue asking for user input on a newline given the current prompt text (`prompt`).
60
60
| handler | (command: string)=>any | Handle a command (`command`), logging data with `this.log()` or `this.logX()`, and calling `this.return()` when finished.
61
-
| promptLabel? | string \| ()=>string | String displayed to prompt user for input.
61
+
| promptLabel? | string \| ()=>string | String or function that generates a string displayed to prompt user for input.
62
62
| welcomeMessage? | string | Initial message displayed after mount.
<td>Return a list of possible completions given a list of (<code>words</code>), index of the word containing the cursor (<code>cursor</code>) , and the full prompt text (<code>prompt</code>).</td>
99
99
</tr>
100
100
<tr>
101
101
<td>continue?</td>
102
-
<td>function(prompt: string): bool</td>
102
+
<td>(prompt: string)=>bool</td>
103
103
<td>Return a boolean indicating whether to continue asking for user input on a newline given the current prompt text (<code>prompt</code>).</td>
104
104
</tr>
105
105
<tr>
106
106
<td>handler</td>
107
-
<td>function(command: string): any</td>
107
+
<td>(command: string)=>any</td>
108
108
<td>Handle a command (<code>command</code>), logging data with <code>this.log()</code> or <code>this.logX()</code>, and calling <code>this.return()</code> when finished.</td>
109
109
</tr>
110
110
<tr>
111
111
<td>promptLabel?</td>
112
-
<td>string</td>
113
-
<td>String displayed to prompt user for input.</td>
112
+
<td>string | ()=>string</td>
113
+
<td>String or function that generates a string displayed to prompt user for input.</td>
114
114
</tr>
115
115
<tr>
116
116
<td>welcomeMessage?</td>
@@ -134,17 +134,17 @@ <h2>
134
134
<tbody>
135
135
<tr>
136
136
<td>log</td>
137
-
<td>function(...messages: any): void</td>
137
+
<td>(...messages: any)=>void</td>
138
138
<td>Log messages to the console. If string, print the value, otherwise, print the JSON value of the message.</td>
0 commit comments