Skip to content

Commit

Permalink
Update src/services/decoders/ClpIrDecoder.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Junhao Liao <[email protected]>
  • Loading branch information
davemarco and junhaoliao authored Jan 10, 2025
1 parent 537290c commit b71dcb0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/services/decoders/ClpIrDecoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,11 @@ class ClpIrDecoder implements Decoder {
endIdx: number,
useFilter: boolean
): Nullable<DecodeResult[]> {
const results: Nullable<DecodeResult[]> =
this.#streamReader.decodeRange(beginIdx, endIdx, useFilter);

// eslint-disable-next-line no-warning-comments
// TODO: Fix DecodeResult typing in clp-ffi-js to be nullable.
// TODO: Correct DecodeResult typing in `clp-ffi-js` and remove below type assertion.
const results =
this.#streamReader.decodeRange(beginIdx, endIdx, useFilter) as Nullable<DecodeResult[]>;

// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (null === results) {
return null;
}
Expand Down

0 comments on commit b71dcb0

Please sign in to comment.