@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
50 lines (49 loc) • 2.31 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataSwimPaceMinutesPer100Yard = exports.DataSwimPace = void 0;
var helpers_1 = require("../events/utilities/helpers");
var data_pace_1 = require("./data.pace");
var DataSwimPace = /** @class */ (function (_super) {
__extends(DataSwimPace, _super);
function DataSwimPace() {
return _super !== null && _super.apply(this, arguments) || this;
}
DataSwimPace.prototype.getValue = function (formatForDataType) {
switch (formatForDataType) {
case DataSwimPaceMinutesPer100Yard.type:
return helpers_1.convertSwimPaceToSwimPacePer100Yard(this.value);
default:
return _super.prototype.getValue.call(this, formatForDataType);
}
};
DataSwimPace.type = 'Swim Pace';
DataSwimPace.unit = 'min/100m';
return DataSwimPace;
}(data_pace_1.DataPace));
exports.DataSwimPace = DataSwimPace;
var DataSwimPaceMinutesPer100Yard = /** @class */ (function (_super) {
__extends(DataSwimPaceMinutesPer100Yard, _super);
function DataSwimPaceMinutesPer100Yard() {
return _super !== null && _super.apply(this, arguments) || this;
}
DataSwimPaceMinutesPer100Yard.type = 'Swim Pace in minutes per 100 yard';
DataSwimPaceMinutesPer100Yard.displayType = DataSwimPace.type;
DataSwimPaceMinutesPer100Yard.unit = 'min/100yrd';
return DataSwimPaceMinutesPer100Yard;
}(DataSwimPace));
exports.DataSwimPaceMinutesPer100Yard = DataSwimPaceMinutesPer100Yard;