mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
deprecate writeSync
This commit is contained in:
+241
-230
File diff suppressed because it is too large
Load Diff
@@ -21,6 +21,9 @@ export class TestTerminal extends Terminal {
|
||||
public get curAttrData(): IAttributeData { return (this as any)._inputHandler._curAttrData; }
|
||||
public keyDown(ev: any): boolean | undefined { return this._keyDown(ev); }
|
||||
public keyPress(ev: any): boolean { return this._keyPress(ev); }
|
||||
public writeP(data: string | Uint8Array): Promise<void> {
|
||||
return new Promise(r => this.write(data, r));
|
||||
}
|
||||
}
|
||||
|
||||
export class MockTerminal implements ITerminal {
|
||||
|
||||
@@ -125,7 +125,17 @@ export abstract class CoreTerminal extends Disposable implements ICoreTerminal {
|
||||
this._writeBuffer.write(data, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write data to terminal synchonously.
|
||||
*
|
||||
* This method is unreliable with async parser handlers, thus should not
|
||||
* be used anymore. If you need blocking semantics on data input consider
|
||||
* `write` with a callback instead.
|
||||
*
|
||||
* @deprecated Unreliable, will be removed soon.
|
||||
*/
|
||||
public writeSync(data: string | Uint8Array): void {
|
||||
console.error('writeSync is unreliable and will be removed soon.');
|
||||
this._writeBuffer.writeSync(data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user