@esportsplus/typescript 0.8.14 → 0.9.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/build/types.d.ts +4 -1
- package/package.json +1 -1
- package/src/types.ts +3 -1
- package/tsconfig.base.json +5 -6
- package/tsconfig.browser.json +7 -0
- package/tsconfig.package.json +6 -1
package/build/types.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
type Brand<T, B extends string> = T & {
|
|
2
|
+
__brand: B;
|
|
3
|
+
};
|
|
1
4
|
type DeepReadonly<T> = T extends (...args: any[]) => any ? T : T extends Array<infer R> ? ReadonlyArray<DeepReadonly<R>> : T extends object ? {
|
|
2
5
|
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
3
6
|
} : T;
|
|
@@ -10,4 +13,4 @@ type Prettify<T> = {
|
|
|
10
13
|
type UnionRecord<U, V extends Record<string, unknown>> = Prettify<U & {
|
|
11
14
|
[K in keyof U]?: undefined;
|
|
12
15
|
} & V>;
|
|
13
|
-
export type { DeepReadonly, Function, NeverAsync, NeverFunction, Prettify, UnionRecord };
|
|
16
|
+
export type { Brand, DeepReadonly, Function, NeverAsync, NeverFunction, Prettify, UnionRecord };
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
type Brand<T, B extends string> = T & { __brand: B };
|
|
2
|
+
|
|
1
3
|
type DeepReadonly<T> = T extends (...args: any[]) => any
|
|
2
4
|
? T
|
|
3
5
|
: T extends Array<infer R>
|
|
@@ -31,4 +33,4 @@ type Prettify<T> = {
|
|
|
31
33
|
type UnionRecord<U, V extends Record<string, unknown>> = Prettify<U & { [K in keyof U]?: undefined } & V>;
|
|
32
34
|
|
|
33
35
|
|
|
34
|
-
export type { DeepReadonly, Function, NeverAsync, NeverFunction, Prettify, UnionRecord };
|
|
36
|
+
export type { Brand, DeepReadonly, Function, NeverAsync, NeverFunction, Prettify, UnionRecord };
|
package/tsconfig.base.json
CHANGED
|
@@ -8,9 +8,7 @@
|
|
|
8
8
|
"esModuleInterop": true,
|
|
9
9
|
"isolatedModules": true,
|
|
10
10
|
"lib": [
|
|
11
|
-
"
|
|
12
|
-
"dom.iterable",
|
|
13
|
-
"esnext"
|
|
11
|
+
"es2024"
|
|
14
12
|
],
|
|
15
13
|
"module": "esnext",
|
|
16
14
|
"moduleDetection": "force",
|
|
@@ -28,14 +26,15 @@
|
|
|
28
26
|
},
|
|
29
27
|
"removeComments": true,
|
|
30
28
|
"resolveJsonModule": true,
|
|
29
|
+
"rootDir": "${configDir}/src",
|
|
31
30
|
"skipLibCheck": true,
|
|
32
31
|
"strict": true,
|
|
33
|
-
"target": "
|
|
32
|
+
"target": "es2024"
|
|
34
33
|
},
|
|
35
34
|
"include": [
|
|
36
|
-
"${configDir}/src"
|
|
35
|
+
"${configDir}/src/**/*"
|
|
37
36
|
],
|
|
38
37
|
"tsc-alias": {
|
|
39
|
-
"resolveFullPaths": true
|
|
38
|
+
"resolveFullPaths": true
|
|
40
39
|
}
|
|
41
40
|
}
|
package/tsconfig.browser.json
CHANGED
package/tsconfig.package.json
CHANGED