As far as I can tell, typings for the SpinePlugin are not available.
[Optional] Do you want to help provide this feature?
I'd like to contribute this if it's not done. It's possible that I was just not looking in the right place. Assuming it's not already done, do we have any resources on how the phaser.d.ts was generated? I did have a rough WIP of what I'm using for my project currently which I made with https://www.npmjs.com/package/tsd-jsdoc and some manual editing.
You're right, there are no typings for the plugin itself (although there are for the Spine runtimes). If you'd like to contribute these I'd be more than happy to accept them. We use our own jsdoc parser to generate the current defs, which could be adapted to work on the Spine Plugin too, I guess, but it might be safer to keep it separate.
I can certainly contribute these sometime. Is the jsdoc parser you guys use in this repo? I noticed that the typings I generated were slightly different in format/style than the ones in phaser.d.ts. I don't know if it really matters, but worth mentioning.
For the short-term future, anyone who is like me and is looking to use the spine plugin can probably just use the above attached file as while i haven't tested it extensively, it is working for me.
(it also doesn't handle stuff like
* @param {?spine.Skin} newSkin - The Skin to set. May be `null`.
*
* @return {this} This Game Object.
*/
setSkin(newSkin: spine.Skin): this;
which should be
* @param {?spine.Skin} newSkin - The Skin to set. May be `null`.
*
* @return {this} This Game Object.
*/
setSkin(newSkin: spine.Skin | null): this;
Our defs generator can be found in the repo in the scripts/tsgen folder.
I've hand-rolled some definition files for the SpinePlugin in this PR: https://github.com/photonstorm/phaser/pull/4948
I can see a case for updating the jsdoc parser to generate them but also a case for keeping it separate as mentioned by @photonstorm
I'm assuming the matter.js and existing spine definition files were not auto-generated?
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
@supertommy Matter defs are hand-rolled. The Spine ones are those provided by Esoteric themselves.