@hedia/types 2.11.0 → 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,7 +9,7 @@ let ActivityReductionIntervals = exports.ActivityReductionIntervals = /*#__PURE_
|
|
|
9
9
|
ActivityReductionIntervals["fromZero"] = "fromZero";
|
|
10
10
|
ActivityReductionIntervals["fromThirty"] = "fromThirty";
|
|
11
11
|
ActivityReductionIntervals["fromFortysix"] = "fromFortysix";
|
|
12
|
-
ActivityReductionIntervals["
|
|
12
|
+
ActivityReductionIntervals["fromSixtyone"] = "fromSixtyone";
|
|
13
13
|
return ActivityReductionIntervals;
|
|
14
14
|
}({});
|
|
15
15
|
/** Enum used to indicate the category or intensity of a physical activity. */
|
|
@@ -14,7 +14,7 @@ export declare enum ActivityReductionIntervals {
|
|
|
14
14
|
fromZero = "fromZero",
|
|
15
15
|
fromThirty = "fromThirty",
|
|
16
16
|
fromFortysix = "fromFortysix",
|
|
17
|
-
|
|
17
|
+
fromSixtyone = "fromSixtyone"
|
|
18
18
|
}
|
|
19
19
|
/** Enum used to indicate the category or intensity of a physical activity. */
|
|
20
20
|
export declare enum ActivityIntensity {
|
|
@@ -38,13 +38,13 @@ export declare enum ActivityEnum {
|
|
|
38
38
|
* For physical activities over 60 minutes the value is also null
|
|
39
39
|
* A null value represents that it is not supported by HDA but users can still set it.
|
|
40
40
|
*/
|
|
41
|
-
type ReductionValue<Intensity extends ActivityIntensity, Interval extends ActivityReductionIntervals> = Interval extends ActivityReductionIntervals.
|
|
41
|
+
type ReductionValue<Intensity extends ActivityIntensity, Interval extends ActivityReductionIntervals> = Interval extends ActivityReductionIntervals.fromSixtyone ? number | null : Intensity extends ActivityIntensity.hard ? Interval extends ActivityReductionIntervals.fromFortysix ? number | null : number : number;
|
|
42
42
|
type ActivityReductionMatrix = {
|
|
43
43
|
[I in ActivityIntensity]: {
|
|
44
44
|
[J in ActivityReductionIntervals]: ReductionValue<I, J>;
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
|
-
type PostReductionValue<Interval extends ActivityReductionIntervals> = Interval extends ActivityReductionIntervals.
|
|
47
|
+
type PostReductionValue<Interval extends ActivityReductionIntervals> = Interval extends ActivityReductionIntervals.fromSixtyone ? number | null : number;
|
|
48
48
|
type ActivityPostReduction = {
|
|
49
49
|
post: {
|
|
50
50
|
[Interval in ActivityReductionIntervals]: PostReductionValue<Interval>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../src/activity/activity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAC1B,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACjC,iBAAiB,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;CAC3C;AAED,sHAAsH;AACtH,oBAAY,0BAA0B;IACrC,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,
|
|
1
|
+
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../src/activity/activity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAC1B,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAA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