hevy-shared 1.0.893 → 1.0.895

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
@@ -1873,6 +1873,7 @@ export interface HevyTrainerUserPreferences {
1873
1873
  }
1874
1874
  export interface LinkPreviewMetadataResponse {
1875
1875
  title: string;
1876
+ description: string;
1876
1877
  url: string;
1877
1878
  image_url: string;
1878
1879
  twitter_image_url: string;
@@ -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.893",
3
+ "version": "1.0.895",
4
4
  "description": "",
5
5
  "main": "built/index.js",
6
6
  "types": "built/index.d.ts",