hevy-shared 1.0.1023 → 1.0.1025
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.
- package/built/typeUtils.d.ts +1 -0
- package/built/typeUtils.js +4 -0
- package/built/workout/workout.d.ts +1 -1
- package/package.json +1 -1
package/built/typeUtils.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export declare const dangerousUncheckedTypeCast: <T = void, U extends T = T>(val
|
|
|
39
39
|
* use this if you 100% know what you're doing. If you're not sure, then don't!
|
|
40
40
|
*/
|
|
41
41
|
export declare const assertNonNullish: <T>(value: T) => T & {};
|
|
42
|
+
export declare function isNonNullish<T>(value: T): value is T & {};
|
|
42
43
|
/**
|
|
43
44
|
* What it's not: "I don't know what type this value may be."
|
|
44
45
|
* What it is: "I don't **CARE** about the type of this value."
|
package/built/typeUtils.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TODO = exports.typeSafeIndex = exports.parseJSON = exports.assertNonNullish = exports.dangerousUncheckedTypeCast = exports.exhaustiveTypeException = exports.exhaustiveTypeCheck = exports.isInArray = void 0;
|
|
4
|
+
exports.isNonNullish = isNonNullish;
|
|
4
5
|
const isInArray = (value, array) => array.includes(value);
|
|
5
6
|
exports.isInArray = isInArray;
|
|
6
7
|
const exhaustiveTypeCheck = (_) => void _;
|
|
@@ -37,6 +38,9 @@ exports.dangerousUncheckedTypeCast = dangerousUncheckedTypeCast;
|
|
|
37
38
|
*/
|
|
38
39
|
const assertNonNullish = (value) => value;
|
|
39
40
|
exports.assertNonNullish = assertNonNullish;
|
|
41
|
+
function isNonNullish(value) {
|
|
42
|
+
return !!value;
|
|
43
|
+
}
|
|
40
44
|
/**
|
|
41
45
|
* Safer alternative to `JSON.parse`. Returns `unknown` instead of `any`.
|
|
42
46
|
*
|
|
@@ -46,7 +46,7 @@ export interface OwnedWorkout {
|
|
|
46
46
|
biometrics?: WorkoutBiometrics;
|
|
47
47
|
is_biometrics_public: boolean;
|
|
48
48
|
trainer_program_id: string | undefined;
|
|
49
|
-
|
|
49
|
+
gym_id: string | undefined;
|
|
50
50
|
}
|
|
51
51
|
export interface TrainerWorkout extends OwnedWorkout {
|
|
52
52
|
trainer_program_id: string;
|