ecspresso 0.6.0 → 0.7.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/README.md +187 -0
- package/dist/bundle.d.ts +2 -21
- package/dist/bundles/renderers/pixi.d.ts +13 -29
- package/dist/bundles/renderers/pixi.js +2 -2
- package/dist/bundles/renderers/pixi.js.map +6 -5
- package/dist/bundles/utils/bounds.d.ts +186 -0
- package/dist/bundles/utils/collision.d.ts +201 -0
- package/dist/bundles/utils/movement.d.ts +83 -0
- package/dist/bundles/utils/timers.d.ts +67 -11
- package/dist/bundles/utils/timers.js +2 -2
- package/dist/bundles/utils/timers.js.map +4 -4
- package/dist/bundles/utils/transform.d.ts +148 -0
- package/dist/command-buffer.d.ts +90 -0
- package/dist/ecspresso.d.ts +15 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +7 -6
- package/dist/type-utils.d.ts +9 -6
- package/package.json +1 -1
package/dist/type-utils.d.ts
CHANGED
|
@@ -7,17 +7,20 @@
|
|
|
7
7
|
*/
|
|
8
8
|
type ExactlyCompatible<T, U> = T extends U ? U extends T ? true : false : false;
|
|
9
9
|
/**
|
|
10
|
-
* Check if two record types are compatible (no conflicting keys)
|
|
10
|
+
* Check if two record types are compatible (no conflicting keys).
|
|
11
|
+
* Returns true if no overlapping keys or all overlapping keys have exactly the same type.
|
|
11
12
|
*/
|
|
12
|
-
export type TypesAreCompatible<T extends Record<string, any>, U extends Record<string, any>> =
|
|
13
|
+
export type TypesAreCompatible<T extends Record<string, any>, U extends Record<string, any>> = [
|
|
14
|
+
keyof T & keyof U
|
|
15
|
+
] extends [never] ? true : {
|
|
13
16
|
[K in keyof T & keyof U]: ExactlyCompatible<T[K], U[K]>;
|
|
14
17
|
}[keyof T & keyof U] extends false ? false : true;
|
|
15
18
|
/**
|
|
16
|
-
*
|
|
17
|
-
* Returns true if bundles can be merged without type conflicts
|
|
18
|
-
*
|
|
19
|
+
* Bundle compatibility checker.
|
|
20
|
+
* Returns true if bundles can be merged without type conflicts.
|
|
21
|
+
* All overlapping keys across all type categories must have identical types.
|
|
19
22
|
*/
|
|
20
|
-
export type BundlesAreCompatible<C1 extends Record<string, any>, C2 extends Record<string, any>, E1 extends Record<string, any>, E2 extends Record<string, any>, R1 extends Record<string, any>, R2 extends Record<string, any
|
|
23
|
+
export type BundlesAreCompatible<C1 extends Record<string, any>, C2 extends Record<string, any>, E1 extends Record<string, any>, E2 extends Record<string, any>, R1 extends Record<string, any>, R2 extends Record<string, any>, A1 extends Record<string, unknown> = {}, A2 extends Record<string, unknown> = {}, S1 extends Record<string, any> = {}, S2 extends Record<string, any> = {}> = TypesAreCompatible<C1, C2> extends true ? TypesAreCompatible<E1, E2> extends true ? TypesAreCompatible<R1, R2> extends true ? TypesAreCompatible<A1, A2> extends true ? TypesAreCompatible<S1, S2> : false : false : false : false;
|
|
21
24
|
/**
|
|
22
25
|
* Utility type for merging two types
|
|
23
26
|
*/
|