Classes
REPL
Constructors
new REPL()
new REPL(writer
, opts
?): REPL
Parameters
Parameter | Type |
---|---|
writer | WritableStreamDefaultWriter <Uint8Array > |
opts ? | REPLOptions |
Returns
Properties
Property | Type | Default value |
---|---|---|
buffer | string | '' |
cursorPosition | number | 0 |
history | string [] | undefined |
historyIndex | number | 0 |
inspect | (v : unknown ) => string | undefined |
prompt | string | undefined |
writer | WritableStreamDefaultWriter <Uint8Array > | undefined |
Methods
arrowDown()
arrowDown(): Promise
<void
>
Returns
Promise
<void
>
arrowLeft()
arrowLeft(): Promise
<void
>
Returns
Promise
<void
>
arrowRight()
arrowRight(): Promise
<void
>
Returns
Promise
<void
>
arrowUp()
arrowUp(): Promise
<void
>
Returns
Promise
<void
>
backspace()
backspace(): Promise
<void
>
Returns
Promise
<void
>
print()
print(str
): Promise
<void
>
Parameters
Parameter | Type |
---|---|
str | string |
Returns
Promise
<void
>
renderPrompt()
renderPrompt(extra
): Promise
<void
>
Parameters
Parameter | Type | Default value |
---|---|---|
extra | string | '' |
Returns
Promise
<void
>
submit()
submit(): Promise
<void
>
Returns
Promise
<void
>
write()
write(data
): Promise
<void
>
Parameters
Parameter | Type |
---|---|
data | Uint8Array |
Returns
Promise
<void
>