@alextheman/utility 5.17.0 → 5.17.1
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/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/internal/index.d.cts +2 -2
- package/dist/internal/index.d.ts +2 -2
- package/dist/v6/index.d.cts +4 -4
- package/dist/v6/index.d.ts +4 -4
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1288,7 +1288,7 @@ declare class DataError$1<DataType extends object = Record<PropertyKey, unknown>
|
|
|
1288
1288
|
*
|
|
1289
1289
|
* @returns The `DataError` that was thrown by the `errorFunction`
|
|
1290
1290
|
*/
|
|
1291
|
-
static expectError<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): DataError$1<DataType, ErrorCode>;
|
|
1291
|
+
static expectError<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): DataError$1<DataType, ErrorCode>;
|
|
1292
1292
|
/**
|
|
1293
1293
|
* Gets the thrown `DataError` from a given asynchronous function if one was thrown, and re-throws any other errors, or throws a default `DataError` if no error thrown.
|
|
1294
1294
|
*
|
|
@@ -1300,7 +1300,7 @@ declare class DataError$1<DataType extends object = Record<PropertyKey, unknown>
|
|
|
1300
1300
|
*
|
|
1301
1301
|
* @returns The `DataError` that was thrown by the `errorFunction`
|
|
1302
1302
|
*/
|
|
1303
|
-
static expectErrorAsync<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<DataError$1<DataType, ErrorCode>>;
|
|
1303
|
+
static expectErrorAsync<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<DataError$1<DataType, ErrorCode>>;
|
|
1304
1304
|
/**
|
|
1305
1305
|
* Converts the `DataError` instance to a serialised JSON payload.
|
|
1306
1306
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1288,7 +1288,7 @@ declare class DataError$1<DataType extends object = Record<PropertyKey, unknown>
|
|
|
1288
1288
|
*
|
|
1289
1289
|
* @returns The `DataError` that was thrown by the `errorFunction`
|
|
1290
1290
|
*/
|
|
1291
|
-
static expectError<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): DataError$1<DataType, ErrorCode>;
|
|
1291
|
+
static expectError<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): DataError$1<DataType, ErrorCode>;
|
|
1292
1292
|
/**
|
|
1293
1293
|
* Gets the thrown `DataError` from a given asynchronous function if one was thrown, and re-throws any other errors, or throws a default `DataError` if no error thrown.
|
|
1294
1294
|
*
|
|
@@ -1300,7 +1300,7 @@ declare class DataError$1<DataType extends object = Record<PropertyKey, unknown>
|
|
|
1300
1300
|
*
|
|
1301
1301
|
* @returns The `DataError` that was thrown by the `errorFunction`
|
|
1302
1302
|
*/
|
|
1303
|
-
static expectErrorAsync<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<DataError$1<DataType, ErrorCode>>;
|
|
1303
|
+
static expectErrorAsync<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<DataError$1<DataType, ErrorCode>>;
|
|
1304
1304
|
/**
|
|
1305
1305
|
* Converts the `DataError` instance to a serialised JSON payload.
|
|
1306
1306
|
*
|
|
@@ -147,7 +147,7 @@ declare class DataError<DataType extends object = Record<PropertyKey, unknown>,
|
|
|
147
147
|
*
|
|
148
148
|
* @returns The `DataError` that was thrown by the `errorFunction`
|
|
149
149
|
*/
|
|
150
|
-
static expectError<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): DataError<DataType, ErrorCode>;
|
|
150
|
+
static expectError<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): DataError<DataType, ErrorCode>;
|
|
151
151
|
/**
|
|
152
152
|
* Gets the thrown `DataError` from a given asynchronous function if one was thrown, and re-throws any other errors, or throws a default `DataError` if no error thrown.
|
|
153
153
|
*
|
|
@@ -159,7 +159,7 @@ declare class DataError<DataType extends object = Record<PropertyKey, unknown>,
|
|
|
159
159
|
*
|
|
160
160
|
* @returns The `DataError` that was thrown by the `errorFunction`
|
|
161
161
|
*/
|
|
162
|
-
static expectErrorAsync<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<DataError<DataType, ErrorCode>>;
|
|
162
|
+
static expectErrorAsync<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<DataError<DataType, ErrorCode>>;
|
|
163
163
|
/**
|
|
164
164
|
* Converts the `DataError` instance to a serialised JSON payload.
|
|
165
165
|
*
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -147,7 +147,7 @@ declare class DataError<DataType extends object = Record<PropertyKey, unknown>,
|
|
|
147
147
|
*
|
|
148
148
|
* @returns The `DataError` that was thrown by the `errorFunction`
|
|
149
149
|
*/
|
|
150
|
-
static expectError<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): DataError<DataType, ErrorCode>;
|
|
150
|
+
static expectError<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): DataError<DataType, ErrorCode>;
|
|
151
151
|
/**
|
|
152
152
|
* Gets the thrown `DataError` from a given asynchronous function if one was thrown, and re-throws any other errors, or throws a default `DataError` if no error thrown.
|
|
153
153
|
*
|
|
@@ -159,7 +159,7 @@ declare class DataError<DataType extends object = Record<PropertyKey, unknown>,
|
|
|
159
159
|
*
|
|
160
160
|
* @returns The `DataError` that was thrown by the `errorFunction`
|
|
161
161
|
*/
|
|
162
|
-
static expectErrorAsync<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<DataError<DataType, ErrorCode>>;
|
|
162
|
+
static expectErrorAsync<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<DataError<DataType, ErrorCode>>;
|
|
163
163
|
/**
|
|
164
164
|
* Converts the `DataError` instance to a serialised JSON payload.
|
|
165
165
|
*
|
package/dist/v6/index.d.cts
CHANGED
|
@@ -146,7 +146,7 @@ declare class APIError<DataType extends object = Record<PropertyKey, unknown>, E
|
|
|
146
146
|
*
|
|
147
147
|
* @returns The `APIError` that was thrown by the `errorFunction`
|
|
148
148
|
*/
|
|
149
|
-
static expectError<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): APIError<DataType, ErrorCode>;
|
|
149
|
+
static expectError<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): APIError<DataType, ErrorCode>;
|
|
150
150
|
/**
|
|
151
151
|
* Gets the thrown `APIError` from a given asynchronous function if one was thrown, and re-throws any other errors, or throws a default `APIError` if no error thrown.
|
|
152
152
|
*
|
|
@@ -158,7 +158,7 @@ declare class APIError<DataType extends object = Record<PropertyKey, unknown>, E
|
|
|
158
158
|
*
|
|
159
159
|
* @returns The `APIError` that was thrown by the `errorFunction`
|
|
160
160
|
*/
|
|
161
|
-
static expectErrorAsync<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<APIError<DataType, ErrorCode>>;
|
|
161
|
+
static expectErrorAsync<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<APIError<DataType, ErrorCode>>;
|
|
162
162
|
/**
|
|
163
163
|
* Create a new `APIError` with the error code derived from the status directly.
|
|
164
164
|
*
|
|
@@ -228,7 +228,7 @@ declare class DataError<DataType extends object = Record<PropertyKey, unknown>,
|
|
|
228
228
|
*
|
|
229
229
|
* @returns The `DataError` that was thrown by the `errorFunction`
|
|
230
230
|
*/
|
|
231
|
-
static expectError<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): DataError<DataType, ErrorCode>;
|
|
231
|
+
static expectError<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): DataError<DataType, ErrorCode>;
|
|
232
232
|
/**
|
|
233
233
|
* Gets the thrown `DataError` from a given asynchronous function if one was thrown, and re-throws any other errors, or throws a default `DataError` if no error thrown.
|
|
234
234
|
*
|
|
@@ -240,7 +240,7 @@ declare class DataError<DataType extends object = Record<PropertyKey, unknown>,
|
|
|
240
240
|
*
|
|
241
241
|
* @returns The `DataError` that was thrown by the `errorFunction`
|
|
242
242
|
*/
|
|
243
|
-
static expectErrorAsync<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<DataError<DataType, ErrorCode>>;
|
|
243
|
+
static expectErrorAsync<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<DataError<DataType, ErrorCode>>;
|
|
244
244
|
/**
|
|
245
245
|
* Converts the `DataError` instance to a serialised JSON payload.
|
|
246
246
|
*
|
package/dist/v6/index.d.ts
CHANGED
|
@@ -146,7 +146,7 @@ declare class APIError<DataType extends object = Record<PropertyKey, unknown>, E
|
|
|
146
146
|
*
|
|
147
147
|
* @returns The `APIError` that was thrown by the `errorFunction`
|
|
148
148
|
*/
|
|
149
|
-
static expectError<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): APIError<DataType, ErrorCode>;
|
|
149
|
+
static expectError<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): APIError<DataType, ErrorCode>;
|
|
150
150
|
/**
|
|
151
151
|
* Gets the thrown `APIError` from a given asynchronous function if one was thrown, and re-throws any other errors, or throws a default `APIError` if no error thrown.
|
|
152
152
|
*
|
|
@@ -158,7 +158,7 @@ declare class APIError<DataType extends object = Record<PropertyKey, unknown>, E
|
|
|
158
158
|
*
|
|
159
159
|
* @returns The `APIError` that was thrown by the `errorFunction`
|
|
160
160
|
*/
|
|
161
|
-
static expectErrorAsync<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<APIError<DataType, ErrorCode>>;
|
|
161
|
+
static expectErrorAsync<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<APIError<DataType, ErrorCode>>;
|
|
162
162
|
/**
|
|
163
163
|
* Create a new `APIError` with the error code derived from the status directly.
|
|
164
164
|
*
|
|
@@ -228,7 +228,7 @@ declare class DataError<DataType extends object = Record<PropertyKey, unknown>,
|
|
|
228
228
|
*
|
|
229
229
|
* @returns The `DataError` that was thrown by the `errorFunction`
|
|
230
230
|
*/
|
|
231
|
-
static expectError<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): DataError<DataType, ErrorCode>;
|
|
231
|
+
static expectError<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): DataError<DataType, ErrorCode>;
|
|
232
232
|
/**
|
|
233
233
|
* Gets the thrown `DataError` from a given asynchronous function if one was thrown, and re-throws any other errors, or throws a default `DataError` if no error thrown.
|
|
234
234
|
*
|
|
@@ -240,7 +240,7 @@ declare class DataError<DataType extends object = Record<PropertyKey, unknown>,
|
|
|
240
240
|
*
|
|
241
241
|
* @returns The `DataError` that was thrown by the `errorFunction`
|
|
242
242
|
*/
|
|
243
|
-
static expectErrorAsync<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<DataError<DataType, ErrorCode>>;
|
|
243
|
+
static expectErrorAsync<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<DataError<DataType, ErrorCode>>;
|
|
244
244
|
/**
|
|
245
245
|
* Converts the `DataError` instance to a serialised JSON payload.
|
|
246
246
|
*
|