Merge pull request #5317 from tabarra/docs/registerMarker-tip

docs: added usage tip for registerMarker()
This commit is contained in:
Daniel Imms
2025-04-22 03:03:48 -07:00
committed by GitHub
2 changed files with 24 additions and 4 deletions
+12 -2
View File
@@ -833,21 +833,31 @@ declare module '@xterm/headless' {
/**
* Write data to the terminal.
*
* Note that the change will not be reflected in the {@link buffer}
* immediately as the data is processed asynchronously. Provide a
* {@link callback} to know when the data was processed.
* @param data 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.
* @param callback Optional callback that fires when the data was processed
* by the parser.
* by the parser. This callback must be provided and awaited in order for
* {@link buffer} to reflect the change in the write.
*/
write(data: string | Uint8Array, callback?: () => void): void;
/**
* Writes data to the terminal, followed by a break line character (\n).
*
* Note that the change will not be reflected in the {@link buffer}
* immediately as the data is processed asynchronously. Provide a
* {@link callback} to know when the data was processed.
* @param data 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.
* @param callback Optional callback that fires when the data was processed
* by the parser.
* by the parser. This callback must be provided and awaited in order for
* {@link buffer} to reflect the change in the write.
*/
writeln(data: string | Uint8Array, callback?: () => void): void;
+12 -2
View File
@@ -1265,21 +1265,31 @@ declare module '@xterm/xterm' {
/**
* Write data to the terminal.
*
* Note that the change will not be reflected in the {@link buffer}
* immediately as the data is processed asynchronously. Provide a
* {@link callback} to know when the data was processed.
* @param data 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.
* @param callback Optional callback that fires when the data was processed
* by the parser.
* by the parser. This callback must be provided and awaited in order for
* {@link buffer} to reflect the change in the write.
*/
write(data: string | Uint8Array, callback?: () => void): void;
/**
* Writes data to the terminal, followed by a break line character (\n).
*
* Note that the change will not be reflected in the {@link buffer}
* immediately as the data is processed asynchronously. Provide a
* {@link callback} to know when the data was processed.
* @param data 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.
* @param callback Optional callback that fires when the data was processed
* by the parser.
* by the parser. This callback must be provided and awaited in order for
* {@link buffer} to reflect the change in the write.
*/
writeln(data: string | Uint8Array, callback?: () => void): void;