mol_regexp 0.0.1841 → 0.0.1842
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/node.d.ts +4 -4
- package/package.json +1 -1
- package/web.d.ts +4 -4
package/node.d.ts
CHANGED
|
@@ -18,10 +18,10 @@ declare namespace $ {
|
|
|
18
18
|
/**
|
|
19
19
|
* Return `unknown` when `A` and `B` are the same type. `never` otherwise.
|
|
20
20
|
*
|
|
21
|
-
* $mol_type_equals< unknown , any > & number //
|
|
22
|
-
* $mol_type_equals< never , never > & number //
|
|
21
|
+
* $mol_type_equals< unknown , any > & number // true
|
|
22
|
+
* $mol_type_equals< never , never > & number // false
|
|
23
23
|
*/
|
|
24
|
-
type $mol_type_equals<A, B> = (<X>() => X extends A ? 1 : 2) extends (<X>() => X extends B ? 1 : 2) ?
|
|
24
|
+
type $mol_type_equals<A, B> = (<X>() => X extends A ? 1 : 2) extends (<X>() => X extends B ? 1 : 2) ? true : false;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
declare namespace $ {
|
|
@@ -31,7 +31,7 @@ declare namespace $ {
|
|
|
31
31
|
* // { a : { x : 1 , y : 2 } }
|
|
32
32
|
* $mol_type_merge< { a : { x : 1 } }&{ a : { y : 2 } } >
|
|
33
33
|
*/
|
|
34
|
-
type $mol_type_merge<Intersection> = Intersection extends (...a: any[]) => any ? Intersection : Intersection extends new (...a: any[]) => any ? Intersection : Intersection extends object ? $mol_type_merge_object<Intersection> extends Intersection ?
|
|
34
|
+
type $mol_type_merge<Intersection> = Intersection extends (...a: any[]) => any ? Intersection : Intersection extends new (...a: any[]) => any ? Intersection : Intersection extends object ? $mol_type_merge_object<Intersection> extends Intersection ? true extends $mol_type_equals<{
|
|
35
35
|
[Key in keyof Intersection]: Intersection[Key];
|
|
36
36
|
}, Intersection> ? Intersection : {
|
|
37
37
|
[Key in keyof Intersection]: $mol_type_merge<Intersection[Key]>;
|
package/package.json
CHANGED
package/web.d.ts
CHANGED
|
@@ -18,10 +18,10 @@ declare namespace $ {
|
|
|
18
18
|
/**
|
|
19
19
|
* Return `unknown` when `A` and `B` are the same type. `never` otherwise.
|
|
20
20
|
*
|
|
21
|
-
* $mol_type_equals< unknown , any > & number //
|
|
22
|
-
* $mol_type_equals< never , never > & number //
|
|
21
|
+
* $mol_type_equals< unknown , any > & number // true
|
|
22
|
+
* $mol_type_equals< never , never > & number // false
|
|
23
23
|
*/
|
|
24
|
-
type $mol_type_equals<A, B> = (<X>() => X extends A ? 1 : 2) extends (<X>() => X extends B ? 1 : 2) ?
|
|
24
|
+
type $mol_type_equals<A, B> = (<X>() => X extends A ? 1 : 2) extends (<X>() => X extends B ? 1 : 2) ? true : false;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
declare namespace $ {
|
|
@@ -31,7 +31,7 @@ declare namespace $ {
|
|
|
31
31
|
* // { a : { x : 1 , y : 2 } }
|
|
32
32
|
* $mol_type_merge< { a : { x : 1 } }&{ a : { y : 2 } } >
|
|
33
33
|
*/
|
|
34
|
-
type $mol_type_merge<Intersection> = Intersection extends (...a: any[]) => any ? Intersection : Intersection extends new (...a: any[]) => any ? Intersection : Intersection extends object ? $mol_type_merge_object<Intersection> extends Intersection ?
|
|
34
|
+
type $mol_type_merge<Intersection> = Intersection extends (...a: any[]) => any ? Intersection : Intersection extends new (...a: any[]) => any ? Intersection : Intersection extends object ? $mol_type_merge_object<Intersection> extends Intersection ? true extends $mol_type_equals<{
|
|
35
35
|
[Key in keyof Intersection]: Intersection[Key];
|
|
36
36
|
}, Intersection> ? Intersection : {
|
|
37
37
|
[Key in keyof Intersection]: $mol_type_merge<Intersection[Key]>;
|