Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Basic example not working with typescript

See original GitHub issue

Maybe 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:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

ilackarmscommented, Nov 7, 2021

ahh thank you!

Annoraaqcommented, Nov 7, 2021

Maybe it helps if you create a layer via createLayer() for both of your layers like so:

  for (let i = 0; i < map.layers.length; i++) {
    map.createLayer(i, tileset, 0, 0);

You are only doing it for the first one in your code.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found