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
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -91,14 +91,14 @@ initTerminal(settings)
91
91
92
92
An object that's being passed to every command function & returned by `initTerminal`
93
93
94
-
| Method | Description | Parameters |
95
-
|-------------|-------------|-------------|
96
-
|`print(text, isCommand)`| Prints a given text in the terminal (accepts raw HTML) |`text` - String, `isCommand` - Boolean, optional, defaults to false. Count given string as a command (displays prompt & syntax highlight) |
97
-
|`run(text)`| Emulates a command execution in a terminal (acts the same way as a user would have typed and pressed Enter) |`text` - String |
98
-
|`start()`| Starts a "foreground process": user input is blocked and command prompt never appears. ||
99
-
|`stop()`| Stops "foreground process". ||
100
-
|`type(text, speed, callback)`| Prints a text with "typing" effect. Hides and blocks user input while typing. |`text` - String, text to be printed. `speed` - integer, miliseconds. The higher the number, the slower. `callback` - function, gets executed when the process is finished.|
101
-
|`setPrompt()`| Set terminal prompt |`newPrompt` - String |
|`print(text, isCommand)`| Prints a given text in the terminal (accepts raw HTML)|`text` - String, `isCommand` - Boolean, optional, defaults to false. Count given string as a command (displays prompt & syntax highlight) |
97
+
|`run(text)`| Emulates a command execution in a terminal (acts the same way as a user would have typed and pressed Enter) |`text` - String|
98
+
|`start()`| Starts a "foreground process": user input is blocked and command prompt never appears. ||
99
+
|`stop()`| Stops "foreground process". ||
100
+
|`type(text, speed, isCommand) => Promise<boolean>`| Prints a text with "typing" effect. Hides and blocks user input while typing. Resolves to either `true` or `false` depending on process interruption by the user. |`text` - String, text to be printed. `speed` - integer, miliseconds. The higher the number, the slower. `isCommand` - Boolean, optional, defaults to false. Count given string as a command (displays prompt & syntax highlight) |
101
+
|`setPrompt()`| Set terminal prompt |`newPrompt` - String|
0 commit comments