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

31 lines (30 loc) 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Device = void 0; var helpers_1 = require("../../events/utilities/helpers"); var Device = /** @class */ (function () { function Device(type) { this.type = type || 'Unknown'; } Device.prototype.toJSON = function () { return { type: this.type, index: helpers_1.isNumber(this.index) ? this.index || null : null, batteryStatus: this.batteryStatus || null, name: this.name || null, batteryVoltage: this.batteryVoltage || null, manufacturer: this.manufacturer || null, serialNumber: this.serialNumber || null, product: this.product || null, swInfo: this.swInfo || null, hwInfo: this.hwInfo || null, antDeviceNumber: this.antDeviceNumber || null, antTransmissionType: this.antTransmissionType || null, antNetwork: this.antNetwork || null, sourceType: this.sourceType || null, cumOperatingTime: this.cumOperatingTime || null }; }; return Device; }()); exports.Device = Device;