From 89370a1f74a7962ec3d65ce464b6e94e933ed86c Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 4 Feb 2020 07:54:11 -0800 Subject: [PATCH] Explain why reusing IBufferCell is useful --- typings/xterm.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index 2af7e87e..58f818ee 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -982,7 +982,9 @@ declare module 'xterm' { * behavior. * * @param x The character index to get. - * @param cell Optional cell object to load data into. + * @param cell Optional cell object to load data into for performance + * reasons. This is mainly useful when every cell in the buffer is being + * looped over to avoid creating new objects for every cell. */ getCell(x: number, cell?: IBufferCell): IBufferCell | undefined;