Correct type and use ! to highlight the unsafe part

This commit is contained in:
Daniel Imms
2022-09-09 12:48:55 -07:00
parent 2032f409cf
commit 822ac527ba
+2 -2
View File
@@ -60,7 +60,7 @@ const w: { startIndex: number } = {
export class BufferLine implements IBufferLine {
protected _data: Uint32Array;
protected _combined: {[index: number]: string} = {};
protected _extendedAttrs: {[index: number]: IExtendedAttrs} = {};
protected _extendedAttrs: {[index: number]: IExtendedAttrs | undefined} = {};
public length: number;
constructor(cols: number, fillCellData?: ICellData, public isWrapped: boolean = false) {
@@ -181,7 +181,7 @@ export class BufferLine implements IBufferLine {
cell.combinedData = this._combined[index];
}
if (cell.bg & BgFlags.HAS_EXTENDED) {
cell.extended = this._extendedAttrs[index];
cell.extended = this._extendedAttrs[index]!;
}
return cell;
}