lewster32/phaser-plugin-isometric

Types (possibly) diverged from Phaser?

Open

#42 geöffnet am 12. Juli 2016

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (168 Forks)batch import
help wanted

Repository-Metriken

Stars
 (472 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

My preemptive apologies if this is a silly question—I'm still a typescript/js noob.

When I try to add this plugin, I get a Typescript error:

/// <reference path="../lib/phaser.d.ts" />
/// <reference path="../lib/phaser.plugin.isometric.d.ts" />

var game = new Phaser.game(
  // game stuff
)

game.plugins.add(new Phaser.Plugin.Isometric(game));  // <- error here

The error is: "error TS2345: Argument of type 'Isometric' is not assignable to parameter of type 'PluginConstructorOf'. Type 'Isometric' provides no match for the signature 'new (...parameters: any[]): Plugin'"

I've trawled through Phaser's Plugin types and tried to hack things together to make it work but haven't had success so far, probably solely because of my own incompetence. I'm pretty sure this is the relevant section in Phaser. Any help is hugely appreciated!

Contributor Guide