Skip to content

Commit

Permalink
Correct type and use ! to highlight the unsafe part
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Sep 9, 2022
1 parent 2032f40 commit 822ac52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/buffer/BufferLine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 822ac52

Please sign in to comment.