Skip to content
1 min read · 77 words

Function: implementsSpoolReader()

ts
function implementsSpoolReader(value: unknown): value is SpoolReader;

Returns true if value implements the SpoolReader interface.

Parameters

ParameterTypeDescription
valueunknownThe value to test.

Returns

value is SpoolReader

true when value conforms to the SpoolReader interface.

Remarks

Duck-typed: checks that value is non-null with line, byteLength, lineCount, and readAll as callable functions. Does not use instanceof — there is no SpoolReader constructor.