@alextheman/utility 1.24.0 → 1.25.0

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 CHANGED
@@ -57,6 +57,8 @@ declare function parseUUID(UUID: unknown): UUID;
57
57
 
58
58
  type NonUndefined<T> = T extends undefined ? never : T;
59
59
 
60
+ type PreventUndefined<T> = undefined extends T ? ["Error: Generic type cannot include undefined"] : T;
61
+
60
62
  /**
61
63
  * @deprecated validateUUID() is deprecated in favour of parseUUID()
62
64
  */
@@ -66,4 +68,4 @@ declare function wait(seconds: number): Promise<void>;
66
68
 
67
69
  declare function interpolateObjects(strings: TemplateStringsArray, ...values: unknown[]): string;
68
70
 
69
- export { APIError, type Email, type Env, type HTTPErrorCodes, type NonUndefined, type UUID, addDaysToDate, appendSemicolon, convertFileToBase64, fillArray, fillArrayAsync, formatDateAndTime, getRandomNumber, httpErrorCodeLookup, interpolateObjects, isLeapYear, isMonthlyMultiple, isSameDate, omitProperties, parseEmail, parseEnv, parseUUID, randomiseArray, range, truncate, validateUUID, wait };
71
+ export { APIError, type PreventUndefined as DisallowUndefined, type Email, type Env, type HTTPErrorCodes, type NonUndefined, type UUID, addDaysToDate, appendSemicolon, convertFileToBase64, fillArray, fillArrayAsync, formatDateAndTime, getRandomNumber, httpErrorCodeLookup, interpolateObjects, isLeapYear, isMonthlyMultiple, isSameDate, omitProperties, parseEmail, parseEnv, parseUUID, randomiseArray, range, truncate, validateUUID, wait };
package/dist/index.d.ts CHANGED
@@ -57,6 +57,8 @@ declare function parseUUID(UUID: unknown): UUID;
57
57
 
58
58
  type NonUndefined<T> = T extends undefined ? never : T;
59
59
 
60
+ type PreventUndefined<T> = undefined extends T ? ["Error: Generic type cannot include undefined"] : T;
61
+
60
62
  /**
61
63
  * @deprecated validateUUID() is deprecated in favour of parseUUID()
62
64
  */
@@ -66,4 +68,4 @@ declare function wait(seconds: number): Promise<void>;
66
68
 
67
69
  declare function interpolateObjects(strings: TemplateStringsArray, ...values: unknown[]): string;
68
70
 
69
- export { APIError, type Email, type Env, type HTTPErrorCodes, type NonUndefined, type UUID, addDaysToDate, appendSemicolon, convertFileToBase64, fillArray, fillArrayAsync, formatDateAndTime, getRandomNumber, httpErrorCodeLookup, interpolateObjects, isLeapYear, isMonthlyMultiple, isSameDate, omitProperties, parseEmail, parseEnv, parseUUID, randomiseArray, range, truncate, validateUUID, wait };
71
+ export { APIError, type PreventUndefined as DisallowUndefined, type Email, type Env, type HTTPErrorCodes, type NonUndefined, type UUID, addDaysToDate, appendSemicolon, convertFileToBase64, fillArray, fillArrayAsync, formatDateAndTime, getRandomNumber, httpErrorCodeLookup, interpolateObjects, isLeapYear, isMonthlyMultiple, isSameDate, omitProperties, parseEmail, parseEnv, parseUUID, randomiseArray, range, truncate, validateUUID, wait };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/utility",
3
- "version": "1.24.0",
3
+ "version": "1.25.0",
4
4
  "description": "Helpful utility functions",
5
5
  "license": "ISC",
6
6
  "author": "alextheman",