From cddc888065e849e17543ec7f46394688e1ce09f8 Mon Sep 17 00:00:00 2001 From: arencoskun Date: Thu, 1 Feb 2024 16:49:15 +0300 Subject: [PATCH] Add definition to xterm-headless.d.ts --- typings/xterm-headless.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/typings/xterm-headless.d.ts b/typings/xterm-headless.d.ts index f8cef382..81a6aad1 100644 --- a/typings/xterm-headless.d.ts +++ b/typings/xterm-headless.d.ts @@ -718,6 +718,18 @@ declare module '@xterm/headless' { */ onTitleChange: IEvent; + /** + * Input data to application side. + * The data is treated the same way as typed input at the terminal + * (will appear in the onData event). + * wasUserInput indicates, whether the input is genuine user input. + * It is true by default and triggers additional actions like prompt + * focus or selection clearing. + * Set it to false if your data sent does not resemble + * what a user would have typed (e.g. sequence embedded data). + */ + input(data: string, wasUserInput?: boolean): void; + /** * Resizes the terminal. It's best practice to debounce calls to resize, * this will help ensure that the pty can respond to the resize event