Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/kboot/src/util/usb/encode-command-option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const encodeCommandOption = (option: CommandOption): number[] => {
];

const placeholders = new Array(32 - payload.length)
.fill(0);
.fill(0) as number[];

return [...header, ...payload, ...placeholders];
};
Expand Down
2 changes: 1 addition & 1 deletion packages/mcumgr/src/serial-peripheral.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class SerialPeripheral implements Peripheral {
const startTime = new Date().getTime();

while (true) {
const response = this.#serialPort.read();
const response = this.#serialPort.read() as Buffer;
logger('Read response: %o', response);
let exit = false;

Expand Down
4 changes: 2 additions & 2 deletions packages/mcumgr/src/util/cbor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export function decode(data: ArrayBuffer | SharedArrayBuffer, tagger?: Function,
}
}

function decodeItem() {
function decodeItem(): unknown {
const initialByte = readUint8();
const majorType = initialByte >> 5;
const additionalInformation = initialByte & 0x1f;
Expand Down Expand Up @@ -366,7 +366,7 @@ export function decode(data: ArrayBuffer | SharedArrayBuffer, tagger?: Function,
case 5: {
const retObject = {};
for (i = 0; i < length || length < 0 && !readBreak(); ++i) {
const key = decodeItem();
const key = decodeItem() as string | number;
retObject[key] = decodeItem();
}
return retObject;
Expand Down
Loading