You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using webpack with expose-loader to have Phaser etc available on the global scope. Things are working well, I decided to upgrade to phaser-ce and the only way I could get my IDE (webstorm) to recognise that Phaser was actually a type was doing the following in MY tsconfig.json file
Now it does work but says there are Multiple Options i.e. phaser.d.ts and phaser.comments.d.ts and phaser_box2d.d.ts.
I was wondering if I was doing the above correctly ?
I of course decided to remove the Includes section above but then that fails probably due to the fact that I have the exclude node_modules so the types are never being picked up.
I am using typescript 2.1 and decided to try and use the typeRoots but this also failed
I am little confused of how to proceed do I leave the "../node_modules/phaser-ce/typescript/phaser.d.ts" inside the include section of the tsconfig.json ? It just feels kind of wrong.
Also even if I use this way then 'Phaser' seems to show Multiple Implementations for Phaser
Any help or info really appreciated
Thanks
The text was updated successfully, but these errors were encountered:
"./src/globals.d.ts" defines some global constants that are included in my game via webpack (I need the d.ts file so that my code and the compiler knows that those values exist)
"./src/app.ts" is my games entry point (where the Phaser.Game is created and the boot state started)
"./node_modules/phaser-ce/typescript/phaser.comments.d.ts" is obviously the phaser definitions (phaser.comments.d.ts contains references to pixi.comments.d.ts and p2.d.ts, so you only need to reference the phaser one)
Hi,
I am using webpack with expose-loader to have Phaser etc available on the global scope. Things are working well, I decided to upgrade to phaser-ce and the only way I could get my IDE (webstorm) to recognise that Phaser was actually a type was doing the following in MY tsconfig.json file
Now it does work but says there are Multiple Options i.e. phaser.d.ts and phaser.comments.d.ts and phaser_box2d.d.ts.
I was wondering if I was doing the above correctly ?
I of course decided to remove the Includes section above but then that fails probably due to the fact that I have the exclude node_modules so the types are never being picked up.
I am using typescript 2.1 and decided to try and use the typeRoots but this also failed
"typeRoots" : ["../node_modules/phaser-ce/typescript"]
I am little confused of how to proceed do I leave the "../node_modules/phaser-ce/typescript/phaser.d.ts" inside the include section of the tsconfig.json ? It just feels kind of wrong.
Also even if I use this way then 'Phaser' seems to show Multiple Implementations for Phaser
Any help or info really appreciated
Thanks
The text was updated successfully, but these errors were encountered: