Game Object Factory

I am currently working on a game with Phaser 3 and I am using typescript and the definitions for 3.15.1, when I saw this Dev log entry on the game object factory.

I thought it would be cool to register by custom classes (from Sprite class) and have it just work the this.add command.

When I look at the example in the dev log the method register doesn’t seem to exist on Phaser.GameObjects.GameObjectFacrtory.register.

Am I doing something wrong or does this exist, but it’s not in d.ts file for typescript ?

I appreciate any insights, thank you

I guess my original guess was correct, the register is just not in the typescript definitions.

If I just use it as
((Phaser.GameObjects.GameObjectFactory)as any).register;

It actually works.

Also pluginManager.registerGameObject(…) (plugins/custom game object).

That worked also…

Thank you.