@xylabs/assert
Advanced tools
Comparing version 4.4.0 to 4.4.1
@@ -11,2 +11,4 @@ import type { AssertExErrorFunc, AssertExMessageFunc } from './types.ts'; | ||
*/ | ||
declare function assertEx<T>(expr: T | null | undefined, messageFunc?: AssertExMessageFunc<T>): T; | ||
declare function assertEx<T, R extends Error>(expr: T | null | undefined, errorFunc?: AssertExErrorFunc<T, R>): T; | ||
/** | ||
@@ -20,5 +22,3 @@ * @deprecated - passing a message will soon be required | ||
declare function assertEx<T>(expr: T | null | undefined, message?: string): T; | ||
declare function assertEx<T>(expr: T | null | undefined, messageFunc?: AssertExMessageFunc<T>): T; | ||
declare function assertEx<T, R extends Error>(expr: T | null | undefined, errorFunc?: AssertExErrorFunc<T, R>): T; | ||
export { assertEx }; | ||
//# sourceMappingURL=assertEx.d.ts.map |
{ | ||
"name": "@xylabs/assert", | ||
"version": "4.4.0", | ||
"version": "4.4.1", | ||
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries", | ||
@@ -40,3 +40,3 @@ "keywords": [ | ||
"@xylabs/tsconfig": "^4.2.4", | ||
"typescript": "^5.6.3" | ||
"typescript": "^5.7.2" | ||
}, | ||
@@ -43,0 +43,0 @@ "engines": { |
@@ -12,2 +12,5 @@ import type { AssertExErrorFunc, AssertExMessageFunc } from './types.ts' | ||
*/ | ||
function assertEx<T>(expr: T | null | undefined, messageFunc?: AssertExMessageFunc<T>): T | ||
function assertEx<T, R extends Error>(expr: T | null | undefined, errorFunc?: AssertExErrorFunc<T, R>): T | ||
/** | ||
@@ -21,4 +24,2 @@ * @deprecated - passing a message will soon be required | ||
function assertEx<T>(expr: T | null | undefined, message?: string): T | ||
function assertEx<T>(expr: T | null | undefined, messageFunc?: AssertExMessageFunc<T>): T | ||
function assertEx<T, R extends Error>(expr: T | null | undefined, errorFunc?: AssertExErrorFunc<T, R>): T | ||
function assertEx<T, R extends Error, P extends string | AssertExMessageFunc<T> | AssertExErrorFunc<T, R>>( | ||
@@ -25,0 +26,0 @@ expr: T | null | undefined, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
21546