@types/gimloader 1.7.0 → 1.8.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 +1 -1
- gimloader/index.d.ts +14 -4
- gimloader/package.json +2 -2
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:
|
|
11
|
+
* Last updated: Sat, 27 Sep 2025 00:04:05 GMT
|
|
12
12
|
* Dependencies: [@types/react](https://npmjs.com/package/@types/react), [@types/react-dom](https://npmjs.com/package/@types/react-dom)
|
|
13
13
|
|
|
14
14
|
# Credits
|
gimloader/index.d.ts
CHANGED
|
@@ -188,6 +188,7 @@ declare namespace Gimloader {
|
|
|
188
188
|
needsLib: string[];
|
|
189
189
|
optionalLib: string[];
|
|
190
190
|
syncEval: string;
|
|
191
|
+
gamemode: string[];
|
|
191
192
|
hasSettings: string;
|
|
192
193
|
};
|
|
193
194
|
/** Gets the exported values of a plugin, if it has been enabled */
|
|
@@ -219,6 +220,7 @@ declare namespace Gimloader {
|
|
|
219
220
|
needsLib: string[];
|
|
220
221
|
optionalLib: string[];
|
|
221
222
|
syncEval: string;
|
|
223
|
+
gamemode: string[];
|
|
222
224
|
hasSettings: string;
|
|
223
225
|
};
|
|
224
226
|
/** Gets the exported values of a library */
|
|
@@ -403,12 +405,14 @@ declare namespace Gimloader {
|
|
|
403
405
|
|
|
404
406
|
class ScopedNetApi extends BaseNetApi {
|
|
405
407
|
private readonly id;
|
|
406
|
-
|
|
408
|
+
private readonly defaultGamemode;
|
|
409
|
+
constructor(id: string, defaultGamemode: string[]);
|
|
407
410
|
/**
|
|
408
|
-
* Runs a callback when the game is loaded, or runs it immediately if the game has already loaded
|
|
411
|
+
* Runs a callback when the game is loaded, or runs it immediately if the game has already loaded.
|
|
412
|
+
* If the \@gamemode header is set the callback will only fire if the gamemode matches one of the provided gamemodes.
|
|
409
413
|
* @returns A function to cancel waiting for load
|
|
410
414
|
*/
|
|
411
|
-
onLoad(callback: (type: ConnectionType) => void): () => void;
|
|
415
|
+
onLoad(callback: (type: ConnectionType, gamemode: string) => void, gamemode?: string | string[]): () => void;
|
|
412
416
|
}
|
|
413
417
|
|
|
414
418
|
type ConnectionType = "None" | "Colyseus" | "Blueboat";
|
|
@@ -417,6 +421,8 @@ declare namespace Gimloader {
|
|
|
417
421
|
constructor();
|
|
418
422
|
/** Which type of server the client is currently connected to */
|
|
419
423
|
get type(): ConnectionType;
|
|
424
|
+
/** The id of the gamemode the player is currently playing */
|
|
425
|
+
get gamemode(): string;
|
|
420
426
|
/** The room that the client is connected to, or null if there is no connection */
|
|
421
427
|
get room(): any;
|
|
422
428
|
/** Whether the user is the one hosting the current game */
|
|
@@ -431,7 +437,11 @@ declare namespace Gimloader {
|
|
|
431
437
|
* Runs a callback when the game is loaded, or runs it immediately if the game has already loaded
|
|
432
438
|
* @returns A function to cancel waiting for load
|
|
433
439
|
*/
|
|
434
|
-
onLoad(
|
|
440
|
+
onLoad(
|
|
441
|
+
id: string,
|
|
442
|
+
callback: (type: ConnectionType, gamemode: string) => void,
|
|
443
|
+
gamemode?: string | string[],
|
|
444
|
+
): () => void;
|
|
435
445
|
/** Cancels any calls to {@link onLoad} with the same id */
|
|
436
446
|
offLoad(id: string): void;
|
|
437
447
|
/**
|
gimloader/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/gimloader",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "TypeScript definitions for gimloader",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gimloader",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"@types/react-dom": "*"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {},
|
|
32
|
-
"typesPublisherContentHash": "
|
|
32
|
+
"typesPublisherContentHash": "a67d9d9aae3c87258dd2d26a5f4df0f9d9a0a8520f5614c841acad4b70b8f569",
|
|
33
33
|
"typeScriptVersion": "5.2"
|
|
34
34
|
}
|