Closed wombatbuddy closed 10 years ago
Could you try the defs file in the dev branch please? Have just pushed up a new build that fixes the above and would like to know if it now works properly or there are further errors.
It seems that it is not a file with typescript definitions. This file contains HTML code. Need to load another.
Here you want this one specifically: https://github.com/photonstorm/phaser/raw/dev/build/phaser.d.ts
Ok this issue fixed. but there is still the issue which is described here https://github.com/photonstorm/phaser/issues/369 and other. Do I need to create "New issue" for them or describe it here in comment?
Comments here are fine, or even better would be to fix them in the defs file and submit it to me for merging :)
I've fixed #369 btw.
Definition of class "SAT" is absent at (1724:24)
Yeah I'm tempted to change that to "any" until I've added it.
line 1750 ish..
separateTiles(body: Phaser.Physics.Arcade.Body, tile: <Phaser.Tile>Array): boolean;
should be
separateTiles(body: Phaser.Physics.Arcade.Body, tile: Array<Phaser.Tile>): boolean;
You need to learn markdown guys :)
Ok see the latest commit. I've added the missing SAT class and the fix for #369 is pushed too.
woot! thank you :+1: confirmed that the compiler now works :smile:
think i might as well just fork the dev branch.. and add the typescript defs as i need them
Sweet. Closing this off for now.
In the definition of this methods: "collideHandler" "collideSpriteVsSprite" "collideSpriteVsGroup" "collideGroupVsSelf" "collideGroupVsGroup" "separate" last required parameter follows the optional parameters.
Console output: phaser.d.ts(1741,135): error TS1016: Required parameter cannot follow optional parameter. phaser.d.ts(1742,163): error TS1016: Required parameter cannot follow optional parameter. phaser.d.ts(1743,159): error TS1016: Required parameter cannot follow optional parameter. phaser.d.ts(1744,133): error TS1016: Required parameter cannot follow optional parameter. phaser.d.ts(1745,156): error TS1016: Required parameter cannot follow optional parameter. phaser.d.ts(1748,142): error TS1016: Required parameter cannot follow optional parameter.