UNPKG

@sports-alliance/sports-lib

Version:

A Library to for importing / exporting and processing GPX, TCX, FIT and JSON files from services such as Strava, Movescount, Garmin, Polar etc

23 lines (22 loc) 1.01 kB
import { StreamDataItem, StreamInterface } from './stream.interface'; import { StreamFilterInterface } from './stream.filter.interface'; export declare class Stream implements StreamInterface { readonly type: string; protected data: (number | null)[]; protected filter: StreamFilterInterface | null; constructor(type: string, data?: (number | null)[]); clearFilters(): this; useFilter(filter: StreamFilterInterface): this; hasFilter(): boolean; getData(onlyNumeric?: boolean, filterInfinity?: boolean): (number | null)[]; setData(data: (number | null)[]): this; getStreamDataByTime(startDate: Date, onlyNumeric?: boolean, filterInfinity?: boolean): StreamDataItem[]; getStreamDataByDuration(offset?: number, onlyNumeric?: boolean, filterInfinity?: boolean): StreamDataItem[]; isExportable(): boolean; toJSON(): StreamJSONInterface; private shouldDataBeFiltered; } export interface StreamJSONInterface { type: string; data: (number | null)[]; }