Skip to content

Commit 596b1a6

Browse files
committed
Update documentation
1 parent f395613 commit 596b1a6

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Properties you can pass to the console element
5858
| 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`).
5959
| continue? | (prompt: string)=>bool | Return a boolean indicating whether to continue asking for user input on a newline given the current prompt text (`prompt`).
6060
| 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.
6262
| welcomeMessage? | string | Initial message displayed after mount.
6363

6464

docs/index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,28 +89,28 @@ <h2>
8989
</tr>
9090
<tr>
9191
<td>cancel?</td>
92-
<td>function(): any</td>
92+
<td>()=&gt;any</td>
9393
<td>Function that should stop execution of the current command and call <code>this.return()</code>.</td>
9494
</tr>
9595
<tr>
9696
<td>complete?</td>
97-
<td>function(words: string[], cursor: number, prompt: string): string[]</td>
97+
<td>(words: string[], cursor: number, prompt: string)=&gt;string[]</td>
9898
<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>
9999
</tr>
100100
<tr>
101101
<td>continue?</td>
102-
<td>function(prompt: string): bool</td>
102+
<td>(prompt: string)=&gt;bool</td>
103103
<td>Return a boolean indicating whether to continue asking for user input on a newline given the current prompt text (<code>prompt</code>).</td>
104104
</tr>
105105
<tr>
106106
<td>handler</td>
107-
<td>function(command: string): any</td>
107+
<td>(command: string)=&gt;any</td>
108108
<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>
109109
</tr>
110110
<tr>
111111
<td>promptLabel?</td>
112-
<td>string</td>
113-
<td>String displayed to prompt user for input.</td>
112+
<td>string | ()=&gt;string</td>
113+
<td>String or function that generates a string displayed to prompt user for input.</td>
114114
</tr>
115115
<tr>
116116
<td>welcomeMessage?</td>
@@ -134,17 +134,17 @@ <h2>
134134
<tbody>
135135
<tr>
136136
<td>log</td>
137-
<td>function(...messages: any): void</td>
137+
<td>(...messages: any)=&gt;void</td>
138138
<td>Log messages to the console. If string, print the value, otherwise, print the JSON value of the message.</td>
139139
</tr>
140140
<tr>
141141
<td>logX</td>
142-
<td>function(type: string, ...messages: any): void</td>
142+
<td>(type: string, ...messages: any)=&gt;void</td>
143143
<td>Log messages of a particular type to the console. The messages will be given the class <code>react-console-message-{type}</code>.</td>
144144
</tr>
145145
<tr>
146146
<td>return</td>
147-
<td>function(): void</td>
147+
<td>()=&gt;void</td>
148148
<td>Signal the current command has finished and a new prompt should be displayed.</td>
149149
</tr>
150150
</tbody>

0 commit comments

Comments
 (0)