UNPKG

@signalk/streams

Version:

Utilities for handling streams of Signal K data

17 lines 605 B
import { Transform, TransformCallback } from 'stream'; interface TimestampMessage { timestamp: string; } type GetMilliseconds = (msg: TimestampMessage) => number; interface TimestampThrottleOptions { getMilliseconds?: GetMilliseconds; } export default class TimestampThrottle extends Transform { private lastMsgMillis; private offsetMillis; private readonly getMilliseconds; constructor(options?: TimestampThrottleOptions); _transform(msg: TimestampMessage, encoding: BufferEncoding, done: TransformCallback): void; } export {}; //# sourceMappingURL=timestamp-throttle.d.ts.map