Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions types/generate-json-webpack-plugin/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { Plugin } from "webpack";
import webpack = require("webpack");

export = GenerateJsonWebpackPlugin;

declare class GenerateJsonWebpackPlugin extends Plugin {
declare class GenerateJsonWebpackPlugin implements webpack.WebpackPluginInstance {
constructor(
fileName: string,
value: object,
replacer?: ((key: string, value: any) => any) | null,
space?: string | number | null,
);

apply: (compiler: webpack.Compiler) => void;
}
2 changes: 1 addition & 1 deletion types/generate-json-webpack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"https://github.com/elliottsj/generate-json-webpack-plugin"
],
"dependencies": {
"@types/webpack": "^4"
"@types/webpack": "^4.41.23 || ^5"
},
"devDependencies": {
"@types/generate-json-webpack-plugin": "workspace:."
Expand Down
31 changes: 18 additions & 13 deletions types/gimloader/gimloader-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ api.net.onLoad((type, gamemode) => {});

GL.stores.phaser; // $ExpectType Phaser
window.stores.phaser; // $ExpectType Phaser
let worldManager!: Gimloader.Stores.WorldManager;
worldManager; // $ExpectType WorldManager
let worldManagerInstance!: Gimloader.Stores.WorldManager;
worldManagerInstance; // $ExpectType WorldManager

api.stores.me.movementSpeed; // $ExpectType number
api.stores.loading.percentageAssetsLoaded; // $ExpectType number
Expand All @@ -57,17 +57,22 @@ api.stores.worldOptions.terrainOptions[0].name; // $ExpectType string
api.stores.phaser.scene.add; // $ExpectType GameObjectFactory
api.stores.phaser.mainCharacter.input; // $ExpectType CharacterInput
api.stores.phaser.mainCharacter.physics.getBody().rigidBody.translation(); // $ExpectType Vector
api.stores.phaser.scene.actionManager; // $ExpectType ActionManager
api.stores.phaser.scene.characterManager; // $ExpectType CharacterManager
api.stores.phaser.scene.inputManager; // $ExpectType InputManager
api.stores.phaser.scene.tileManager; // $ExpectType TileManager
api.stores.phaser.scene.worldManager; // $ExpectType WorldManager

let character = api.stores.phaser.scene.characterManager.characters.get("...")!; // $ExpectType Character
const { actionManager, characterManager, inputManager, tileManager, worldManager } = api.stores.phaser.scene;
actionManager; // $ExpectType ActionManager
characterManager; // $ExpectType CharacterManager
inputManager; // $ExpectType InputManager
tileManager; // $ExpectType TileManager
worldManager; // $ExpectType WorldManager

let character = characterManager.characters.get("...")!; // $ExpectType Character
character.setIsMain(true);
api.stores.phaser.scene.inputManager.getMouseWorldXY(); // $ExpectType Vector
api.stores.phaser.scene.tileManager.layerManager.getActualLayerDepth("..."); // $ExpectType number
let device = api.stores.phaser.scene.worldManager.devices.getDeviceById("...")!; // $ExpectType Device
device.colliders.list; // $ExpectType DeviceCollider[]
inputManager.getMouseWorldXY(); // $ExpectType Vector
tileManager.layerManager.getActualLayerDepth("..."); // $ExpectType number
let device = worldManager.devices.getDeviceById("...")!; // $ExpectType Device
device.colliders.list; // $ExpectType ColliderEntry[]
device.colliders.list[0].options.r1; // $ExpectType number | undefined
device.state; // $ExpectType Record<string, any>
api.stores.phaser.scene.worldManager.physics.bodies.staticBodies; // $ExpectType Set<string>
worldManager.physics.bodies.staticBodies; // $ExpectType Set<string>
worldManager.devices.interactives.findClosestInteractiveDevice([], 0, 0); // $ExpectType Device | undefined
worldManager.inGameTerrainBuilder.clearPreviewLayer();
Loading