Skip to main content

assertFitFileByteLength

FitFileViewer - API Documentation v30.0.1


FitFileViewer - API Documentation / main/ipc/fileReadPayload / assertFitFileByteLength

Function: assertFitFileByteLength()

assertFitFileByteLength(byteLength: number): void

Defined in: main/ipc/fileReadPayload.ts:11

Asserts that a FIT file byte length is finite, non-negative, and below the main-process file read cap.

Parameters​

byteLength​

number

Returns​

void

Throws​

TypeError when the byte length is not finite or is negative.

Throws​

Error when the byte length exceeds the FIT file cap.