@xylabs/assert 4.13.3 → 4.13.5

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.
@@ -1,51 +1,45 @@
1
- /**
2
- *
3
- * Intended for defined checks for variables
4
- *
5
- * @param expr - Expression to be evaluated for truthiness
6
- * @param message - Message in Error if expression is false, may be a function that returns a string
7
- * @throws AssertExError
8
- * @returns Value of expression
9
- */
10
- export declare function assertDefinedEx<T>(expr: T | undefined, messageFunc?: AssertExMessageFunc<T>): T;
11
-
12
- export declare function assertDefinedEx<T, R extends Error>(expr: T | undefined, errorFunc?: AssertExErrorFunc<T, R>): T;
13
-
14
- /**
15
- * @deprecated - passing a message will soon be required
16
- */
17
- export declare function assertDefinedEx<T>(expr: T | undefined): T;
18
-
19
- /**
20
- * @deprecated - replace string with () => string
21
- */
22
- export declare function assertDefinedEx<T>(expr: T | undefined, message?: string): T;
23
-
24
- /**
25
- *
26
- * Intended for simple truthiness checks for variables
27
- *
28
- * @param expr - Expression to be evaluated for truthiness
29
- * @param message - Message in Error if expression is false, may be a function that returns a string
30
- * @throws AssertExError
31
- * @returns Value of expression
32
- */
33
- export declare function assertEx<T>(expr: T | null | undefined, messageFunc?: AssertExMessageFunc<T>): T;
34
-
35
- export declare function assertEx<T, R extends Error>(expr: T | null | undefined, errorFunc?: AssertExErrorFunc<T, R>): T;
36
-
37
- /**
38
- * @deprecated - passing a message will soon be required
39
- */
40
- export declare function assertEx<T>(expr: T | null | undefined): T;
41
-
42
- /**
43
- * @deprecated - replace string with () => string
44
- */
45
- export declare function assertEx<T>(expr: T | null | undefined, message?: string): T;
46
-
47
- export declare type AssertExErrorFunc<T, R extends Error> = (value?: T | null) => R;
48
-
49
- export declare type AssertExMessageFunc<T> = (value?: T | null) => string;
50
-
51
- export { }
1
+ type AssertExMessageFunc<T> = (value?: T | null) => string;
2
+ type AssertExErrorFunc<T, R extends Error> = (value?: T | null) => R;
3
+
4
+ /**
5
+ *
6
+ * Intended for defined checks for variables
7
+ *
8
+ * @param expr - Expression to be evaluated for truthiness
9
+ * @param message - Message in Error if expression is false, may be a function that returns a string
10
+ * @throws AssertExError
11
+ * @returns Value of expression
12
+ */
13
+ declare function assertDefinedEx<T>(expr: T | undefined, messageFunc?: AssertExMessageFunc<T>): T;
14
+ declare function assertDefinedEx<T, R extends Error>(expr: T | undefined, errorFunc?: AssertExErrorFunc<T, R>): T;
15
+ /**
16
+ * @deprecated - passing a message will soon be required
17
+ */
18
+ declare function assertDefinedEx<T>(expr: T | undefined): T;
19
+ /**
20
+ * @deprecated - replace string with () => string
21
+ */
22
+ declare function assertDefinedEx<T>(expr: T | undefined, message?: string): T;
23
+
24
+ /**
25
+ *
26
+ * Intended for simple truthiness checks for variables
27
+ *
28
+ * @param expr - Expression to be evaluated for truthiness
29
+ * @param message - Message in Error if expression is false, may be a function that returns a string
30
+ * @throws AssertExError
31
+ * @returns Value of expression
32
+ */
33
+ declare function assertEx<T>(expr: T | null | undefined, messageFunc?: AssertExMessageFunc<T>): T;
34
+ declare function assertEx<T, R extends Error>(expr: T | null | undefined, errorFunc?: AssertExErrorFunc<T, R>): T;
35
+ /**
36
+ * @deprecated - passing a message will soon be required
37
+ */
38
+ declare function assertEx<T>(expr: T | null | undefined): T;
39
+ /**
40
+ * @deprecated - replace string with () => string
41
+ */
42
+ declare function assertEx<T>(expr: T | null | undefined, message?: string): T;
43
+
44
+ export { assertDefinedEx, assertEx };
45
+ export type { AssertExErrorFunc, AssertExMessageFunc };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/assert",
3
- "version": "4.13.3",
3
+ "version": "4.13.5",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "xylabs",
@@ -35,8 +35,8 @@
35
35
  "module": "./dist/neutral/index.mjs",
36
36
  "types": "./dist/neutral/index.d.ts",
37
37
  "devDependencies": {
38
- "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.7",
39
- "@xylabs/tsconfig": "^7.0.0-rc.7",
38
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.8",
39
+ "@xylabs/tsconfig": "^7.0.0-rc.8",
40
40
  "typescript": "^5.8.3"
41
41
  },
42
42
  "engines": {