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

22 lines (21 loc) 931 B
import { SerializableClassInterface } from '../serializable/serializable.class.interface'; import { DataJSONInterface } from './data.json.interface'; import { DataPositionInterface } from './data.position.interface'; export type DefaultDataValue = number | string | boolean | string[] | DataPositionInterface; export type DefaultDataClassValue = DefaultDataValue | unknown[]; export interface DataInterface<TValue = DefaultDataValue> extends SerializableClassInterface { setValue(value: TValue): this; getValue(_formatForDataType?: string): TValue; getDisplayValue(): number | string | boolean | string[] | DataPositionInterface; getType(): string; getUnit(): string; getDisplayUnit(): string; getDisplayType(): string; getUnitSystem(): UnitSystem; isValueTypeValid(value: unknown): boolean; toJSON(): DataJSONInterface; } export declare enum UnitSystem { Metric = 0, Imperial = 1 }