From 78fbae3293e8c79f746b939cec42d275148bce4a Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue, 22 Apr 2025 02:53:35 -0700 Subject: [PATCH] Add additional note to main doc --- typings/xterm-headless.d.ts | 8 ++++++++ typings/xterm.d.ts | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/typings/xterm-headless.d.ts b/typings/xterm-headless.d.ts index 9397dfe4..11d97947 100644 --- a/typings/xterm-headless.d.ts +++ b/typings/xterm-headless.d.ts @@ -833,6 +833,10 @@ 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. @@ -844,6 +848,10 @@ declare module '@xterm/headless' { /** * 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. diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index b4ba20fe..d1c2667d 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -1265,6 +1265,10 @@ 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. @@ -1276,6 +1280,10 @@ declare module '@xterm/xterm' { /** * 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.