@@ -833,21 +833,31 @@ declare module '@xterm/headless' {
833833
834834 /**
835835 * Write data to the terminal.
836+ *
837+ * Note that the change will not be reflected in the {@link buffer}
838+ * immediately as the data is processed asynchronously. Provide a
839+ * {@link callback} to know when the data was processed.
836840 * @param data The data to write to the terminal. This can either be raw
837841 * bytes given as Uint8Array from the pty or a string. Raw bytes will always
838842 * be treated as UTF-8 encoded, string data as UTF-16.
839843 * @param callback Optional callback that fires when the data was processed
840- * by the parser.
844+ * by the parser. This callback must be provided and awaited in order for
845+ * {@link buffer} to reflect the change in the write.
841846 */
842847 write ( data : string | Uint8Array , callback ?: ( ) => void ) : void ;
843848
844849 /**
845850 * Writes data to the terminal, followed by a break line character (\n).
851+ *
852+ * Note that the change will not be reflected in the {@link buffer}
853+ * immediately as the data is processed asynchronously. Provide a
854+ * {@link callback} to know when the data was processed.
846855 * @param data The data to write to the terminal. This can either be raw
847856 * bytes given as Uint8Array from the pty or a string. Raw bytes will always
848857 * be treated as UTF-8 encoded, string data as UTF-16.
849858 * @param callback Optional callback that fires when the data was processed
850- * by the parser.
859+ * by the parser. This callback must be provided and awaited in order for
860+ * {@link buffer} to reflect the change in the write.
851861 */
852862 writeln ( data : string | Uint8Array , callback ?: ( ) => void ) : void ;
853863
0 commit comments