@goodbyenjn/utils 26.4.1 → 26.4.2
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/global-types.d.ts +14 -2
- package/package.json +1 -1
package/dist/global-types.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/method-signature-style */
|
|
2
2
|
|
|
3
|
-
import type { NonFalsy } from "./utils/non-falsy";
|
|
4
|
-
import type { WidenLiteral } from "./utils/widen-literal";
|
|
5
3
|
import type * as Types from "@goodbyenjn/utils/types";
|
|
6
4
|
|
|
7
5
|
declare global {
|
|
@@ -52,6 +50,20 @@ declare global {
|
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
|
|
53
|
+
type WidenLiteral<T> = T extends string
|
|
54
|
+
? string
|
|
55
|
+
: T extends number
|
|
56
|
+
? number
|
|
57
|
+
: T extends boolean
|
|
58
|
+
? boolean
|
|
59
|
+
: T extends bigint
|
|
60
|
+
? bigint
|
|
61
|
+
: T extends symbol
|
|
62
|
+
? symbol
|
|
63
|
+
: T;
|
|
64
|
+
|
|
65
|
+
type NonFalsy<T> = T extends false | 0 | "" | null | undefined | 0n ? never : T;
|
|
66
|
+
|
|
55
67
|
declare global {
|
|
56
68
|
interface Array<T> {
|
|
57
69
|
/**
|