Basic example not working with typescript
See original GitHub issueMaybe it’s something I’m doing wrong? Very simply, typescript isn’t allowing me to compile the basic example due to the error:
Property 'gridEngine' does not exist on type 'Phaser.Scene'.
My phaser game config contains the following:
plugins: {
scene: [
{
key: "gridEngine",
plugin: GridEngine,
mapping: "gridEngine",
},
],
}
However I assume I need to do some extra work to map the types? Or is this not supported?
Sorry, I’m a bit inexperienced with TS/JS, so maybe it was something on my end.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Documentation - TypeScript for JavaScript Programmers
TypeScript knows the JavaScript language and will generate types for you in many cases. For example in creating a variable and assigning it...
Read more >Basic TypeScript example not working `define is not defined`
It fails with Uncaught ReferenceError: define is not defined. Configuration (.babelrc, package.json, cli command).
Read more >Common TypeScript module problems and how to solve them
A firm understanding of TypeScript modules system. Problem 1: Irregular location of dependencies. On a normal occasion, the node-modules ...
Read more >simple onclick TypeScript example does not work on JSFiddle
I tried a very basic TypeScript onclick example on JSFiddle. The example works in JavaScript Javascript example but does not work under ...
Read more >TypeScript tutorial with Visual Studio Code
Let's start with a simple Hello World Node.js example. Create a new folder HelloWorld and launch VS Code. mkdir HelloWorld cd HelloWorld code...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ahh thank you!
Maybe it helps if you create a layer via
createLayer()
for both of your layers like so:You are only doing it for the first one in your code.