hevy-shared 1.0.892 → 1.0.894

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/index.d.ts CHANGED
@@ -667,9 +667,7 @@ export interface BaseExerciseTemplate {
667
667
  volume_doubling_supported?: boolean;
668
668
  /** Exercise asset URL */
669
669
  url?: string;
670
- url_female?: string;
671
670
  thumbnail_url?: string;
672
- thumbnail_url_female?: string;
673
671
  media_type?: 'video' | 'image';
674
672
  }
675
673
  /**
@@ -33,6 +33,29 @@ export type Some<T> = {
33
33
  * ```
34
34
  */
35
35
  export declare const dangerousUncheckedTypeCast: <T = void, U extends T = T>(value: unknown) => U;
36
+ /**
37
+ * Wrapper for TypeScript's non-nullish assertion operator (`!`). Use this
38
+ * instead of the operator directly so it's easier to spot. And, again, only
39
+ * use this if you 100% know what you're doing. If you're not sure, then don't!
40
+ */
41
+ export declare const assertNonNullish: <T>(value: T) => T & {};
42
+ /**
43
+ * What it's not: "I don't know what type this value may be."
44
+ * What it is: "I don't **CARE** about the type of this value."
45
+ * What it is: "Disable the type system for this variable."
46
+ *
47
+ * Alias for `any` that makes it more clear what's going on. Avoid using this,
48
+ * and absolutely avoid using `any` directly even harder! Instead, you may want
49
+ * to use one of the following:
50
+ *
51
+ * - `unknown` // any value, can be nullish or not - need to use type guards
52
+ * - `unknown[]` // same as above, but we know it's an array of these unknowns,
53
+ * // so we allow array functions to be used on it
54
+ * - `object` // any value where `typeof value === 'object'` - except `null`
55
+ * - `{}` // any non-nullish value, object or not; ignore the lint error
56
+ * - `never` // no value; not `undefined` or `null`, but _unreachable code_
57
+ */
58
+ export type UNSAFE_Untyped = any;
36
59
  /**
37
60
  * Safer alternative to `JSON.parse`. Returns `unknown` instead of `any`.
38
61
  *
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TODO = exports.typeSafeIndex = exports.parseJSON = exports.dangerousUncheckedTypeCast = exports.exhaustiveTypeException = exports.exhaustiveTypeCheck = exports.isInArray = void 0;
3
+ exports.TODO = exports.typeSafeIndex = exports.parseJSON = exports.assertNonNullish = exports.dangerousUncheckedTypeCast = exports.exhaustiveTypeException = exports.exhaustiveTypeCheck = exports.isInArray = void 0;
4
4
  const isInArray = (value, array) => array.includes(value);
5
5
  exports.isInArray = isInArray;
6
6
  const exhaustiveTypeCheck = (_) => void _;
@@ -30,6 +30,13 @@ exports.exhaustiveTypeException = exhaustiveTypeException;
30
30
  */
31
31
  const dangerousUncheckedTypeCast = (value) => value;
32
32
  exports.dangerousUncheckedTypeCast = dangerousUncheckedTypeCast;
33
+ /**
34
+ * Wrapper for TypeScript's non-nullish assertion operator (`!`). Use this
35
+ * instead of the operator directly so it's easier to spot. And, again, only
36
+ * use this if you 100% know what you're doing. If you're not sure, then don't!
37
+ */
38
+ const assertNonNullish = (value) => value;
39
+ exports.assertNonNullish = assertNonNullish;
33
40
  /**
34
41
  * Safer alternative to `JSON.parse`. Returns `unknown` instead of `any`.
35
42
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hevy-shared",
3
- "version": "1.0.892",
3
+ "version": "1.0.894",
4
4
  "description": "",
5
5
  "main": "built/index.js",
6
6
  "types": "built/index.d.ts",