Class TerminalExperimental
Implements
- Terminal
Hierarchy
- Terminal
- Terminal
Index
Constructors
Accessors
Methods
Accessors
addons
ansi
- get ansi(): __module
Experimental
Get ANSI escape sequences
Returns __module
cmd
- get cmd(): string
Experimental
Get current command
Returns string
commands
- get commands(): { [key: string]: TerminalCommand }
Experimental
Get terminal commands
Returns { [key: string]: TerminalCommand }
cwd
- get cwd(): string
Experimental
Get current working directory
Returns string
emojis
- get emojis(): __module
Experimental
Get emoji utilities
Returns __module
events
id
- get id(): string
Experimental
Get terminal ID
Returns string
promptTemplate
- get promptTemplate(): string
Experimental
Get/set prompt template
Returns string
- set promptTemplate(value: string): void
Experimental
Get/set prompt template
Parameters
- value: string
Returns void
socket
socketKey
- get socketKey(): undefined | JsonWebKey
Experimental
Get socket public key
Returns undefined | JsonWebKey
stderr
- get stderr(): WritableStream<Uint8Array>
Experimental
Get standard error stream
Returns WritableStream<Uint8Array>
stdin
- get stdin(): ReadableStream<Uint8Array>
Experimental
Get standard input stream
Returns ReadableStream<Uint8Array>
stdout
- get stdout(): WritableStream<Uint8Array>
Experimental
Get standard output stream
Returns WritableStream<Uint8Array>
Methods
clearCommand
connect
createSpecialLink
getInputStream
- getInputStream(): ReadableStream<Uint8Array>
Experimental
Get input stream
Returns ReadableStream<Uint8Array>
hide
keyHandler
- keyHandler(
__namedParameters: { domEvent: KeyboardEvent; key: string },
): Promise<void> Experimental
Parameters
- __namedParameters: { domEvent: KeyboardEvent; key: string }
Returns Promise<void>
listen
mount
- mount(element: HTMLElement): void
Experimental
Mount terminal to DOM element
Parameters
- element: HTMLElement
Element to mount to
Returns void
- element: HTMLElement
paste
prompt
readline
restoreCommand
serialize
shortcutKeyHandler
- shortcutKeyHandler(
__namedParameters: { domEvent: KeyboardEvent },
): Promise<void> Experimental
Parameters
- __namedParameters: { domEvent: KeyboardEvent }
Returns Promise<void>
show
spinner
unlisten
write
- write(data: string | Uint8Array): void
Experimental
Write data to the terminal.
Parameters
- data: string | Uint8Array
The data to write to the terminal. This can either be raw bytes given as Uint8Array from the pty or a string. Raw bytes will always be treated as UTF-8 encoded, string data as UTF-16.
Returns void
- data: string | Uint8Array
writeln
- writeln(data: string | Uint8Array): void
Experimental
Writes data to the terminal, followed by a break line character (\n).
Parameters
- data: string | Uint8Array
The data to write to the terminal. This can either be raw bytes given as Uint8Array from the pty or a string. Raw bytes will always be treated as UTF-8 encoded, string data as UTF-16.
Returns void
- data: string | Uint8Array
Author
Jay Mathis code@mathis.network (https://github.com/mathiscode)
The Terminal class extends xterm.js to support ecmaOS-specific functionality.