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
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,22 +53,22 @@ Properties you can pass to the console element
53
53
54
54
| Prop | Type | Description
55
55
| ---- | ---- | ----
56
-
| autofocus? | bool | Autofocus the console on component mount.
57
-
| cancel? | function(): any | Function that should stop execution of the current command and call `this.return()`.
58
-
| complete? | function(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
-
| continue? | function(prompt: string): bool | Return a boolean indicating whether to continue asking for user input on a newline given the current prompt text (`prompt`).
60
-
| handler | function(command: string): any | Handle a command (`command`), logging data with `this.log()` or `this.logX()`, and calling `this.return()` when finished.
61
-
| promptLabel? | string \|function(): string | String displayed to prompt user for input.
62
-
| welcomeMessage? | string | Initial message displayed after mount.
56
+
| autofocus? | bool | Autofocus the console on component mount.
57
+
| cancel? | ()=>any | Function that should stop execution of the current command and call `this.return()`.
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
+
| 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
+
| 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.
62
+
| welcomeMessage? | string | Initial message displayed after mount.
63
63
64
64
65
65
## Public members
66
66
67
67
| Member | Type | Description
68
68
| ---- | ---- | ----
69
-
| log | function(...messages: any): void | Log messages to the console. If string, print the value, otherwise, print the JSON value of the message.
70
-
| logX | function(type: string, ...messages: any): void | Log messages of a particular type to the console. The messages will be given the class `react-console-message-{type}`.
71
-
| return | function(): void | Signal the current command has finished and a new prompt should be displayed.
69
+
| log | (...messages: any)=>void | Log messages to the console. If string, print the value, otherwise, print the JSON value of the message.
70
+
| logX | (type: string, ...messages: any)=>void | Log messages of a particular type to the console. The messages will be given the class `react-console-message-{type}`.
71
+
| return | ()=>void | Signal the current command has finished and a new prompt should be displayed.
0 commit comments