@types/gimloader 1.11.2 → 1.12.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.
gimloader/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for gimloader (https://github.com/Gimload
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gimloader.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sat, 07 Mar 2026 04:29:19 GMT
11
+ * Last updated: Sun, 22 Mar 2026 20:03:38 GMT
12
12
  * Dependencies: [@dimforge/rapier2d-compat](https://npmjs.com/package/@dimforge/rapier2d-compat), [@types/react](https://npmjs.com/package/@types/react), [@types/react-dom](https://npmjs.com/package/@types/react-dom), [eventemitter2](https://npmjs.com/package/eventemitter2), [phaser](https://npmjs.com/package/phaser)
13
13
 
14
14
  # Credits
gimloader/index.d.ts CHANGED
@@ -2273,6 +2273,7 @@ declare global {
2273
2273
  immediate?: boolean,
2274
2274
  ): () => void;
2275
2275
  onChange(callback: () => void): () => void;
2276
+ onRemove(callback: () => void): () => void;
2276
2277
  };
2277
2278
  type CollectionSchema<T, K> = ColyseusMethods & {
2278
2279
  onAdd(callback: (value: T, index: K) => void, immediate?: boolean): () => void;
@@ -2874,6 +2875,8 @@ declare global {
2874
2875
  class BaseUIApi {
2875
2876
  /** Shows a customizable modal to the user */
2876
2877
  showModal(element: HTMLElement | React$1.ReactElement, options?: ModalOptions): void;
2878
+ /** Forces Gimkit's react tree to fully rerender */
2879
+ forceReactUpdate(): void;
2877
2880
  /**
2878
2881
  * Gimkit's notification object, only available when joining or playing a game
2879
2882
  *
@@ -2960,6 +2963,8 @@ declare global {
2960
2963
  ) => boolean | void;
2961
2964
 
2962
2965
  type PatcherInsteadCallback<T> = (thisVal: any, args: T extends BaseFunction ? Parameters<T> : any[]) => any;
2966
+
2967
+ type PatcherSwapCallback<T> = (...args: T extends BaseFunction ? Parameters<T> : any[]) => any;
2963
2968
  class PatcherApi {
2964
2969
  /**
2965
2970
  * Runs a callback after a function on an object has been run
@@ -2992,6 +2997,16 @@ declare global {
2992
2997
  method: K,
2993
2998
  callback: PatcherInsteadCallback<O[K]>,
2994
2999
  ): () => void;
3000
+ /**
3001
+ * Replaces a function on an object with another function
3002
+ * @returns A function to remove the patch
3003
+ */
3004
+ swap<O extends object, K extends FunctionKeys<O>>(
3005
+ id: string,
3006
+ object: O,
3007
+ method: K,
3008
+ callback: PatcherSwapCallback<O[K]>,
3009
+ ): () => void;
2995
3010
  /** Removes all patches with a given id */
2996
3011
  unpatchAll(id: string): void;
2997
3012
  }
@@ -3025,10 +3040,19 @@ declare global {
3025
3040
  method: K,
3026
3041
  callback: PatcherInsteadCallback<O[K]>,
3027
3042
  ): () => void;
3043
+ /**
3044
+ * Replaces a function on an object with another function
3045
+ * @returns A function to remove the patch
3046
+ */
3047
+ swap<O extends object, K extends FunctionKeys<O>>(
3048
+ object: O,
3049
+ method: K,
3050
+ callback: PatcherSwapCallback<O[K]>,
3051
+ ): () => void;
3028
3052
  }
3029
3053
 
3030
3054
  // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
3031
- type RunInScopeCallback = (code: string, run: (evalCode: string) => void) => true | void;
3055
+ type RunInScopeCallback = (code: string, run: (evalCode: string) => any, initial: boolean) => true | void;
3032
3056
 
3033
3057
  interface Exposer {
3034
3058
  check?: string;
gimloader/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/gimloader",
3
- "version": "1.11.2",
3
+ "version": "1.12.0",
4
4
  "description": "TypeScript definitions for gimloader",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gimloader",
6
6
  "license": "MIT",
@@ -32,6 +32,6 @@
32
32
  "eventemitter2": "~6.4.9"
33
33
  },
34
34
  "peerDependencies": {},
35
- "typesPublisherContentHash": "6f33536e5ae86627f7bab7dec2ba5f877de40314196014b5c7d630ba1aa578b1",
35
+ "typesPublisherContentHash": "4dee83f45a8e1a086d24e48496e7bbc62e9c50dae8c27ca08e57fb82748939d5",
36
36
  "typeScriptVersion": "5.2"
37
37
  }