haxe-phaser3 icon indicating copy to clipboard operation
haxe-phaser3 copied to clipboard

Typedefs are ignoring `@extends` JSDoc

Open Antriel opened this issue 6 years ago • 3 comments

E.g. phaser.GraphicsOptions should include types from phaser.GraphicsStyles.

Antriel avatar Feb 16 '19 09:02 Antriel

Superb, just a small issue: duplicate fields are kept, they should be merged (and their types technically union-ed if different, but we can just use Dynamic, assuming they are different in the first place). E.g. phaser.JSONGameObject.name.

Antriel avatar Feb 16 '19 11:02 Antriel

It seems better now, but I still don't unionize types if they are differents (there is no case here, but it can be different in a next version ?)

sebbernery avatar Feb 16 '19 12:02 sebbernery

Could happen, although seems unlikely. Maybe with two different configs using Int and Number for the same field. Typing that to Dynamic, if that's the case, will suffice. But if you want it perfect, it could be done using haxe.extern.EitherType, although it doesn't feel too important.

Antriel avatar Feb 16 '19 12:02 Antriel