javascript-externs-generator icon indicating copy to clipboard operation
javascript-externs-generator copied to clipboard

Cannot create externs for Phaser 3

Open chilliams opened this issue 6 years ago • 1 comments

I'm using this URL: https://cdn.jsdelivr.net/npm/[email protected]/dist/phaser.js

I get this error: "TypeError: a.F is not a function. Check console for stack trace."

chilliams avatar May 06 '18 16:05 chilliams

It works when I run it without advanced compilation, so I'm not sure what's going on there.

I found a potential fix - replacing the ClojureScript set (#{}) with an ES6 Set, but I noticed a regression that comes as a side effect if multiple references to an object are held (the second time the object is encountered it is ignored), so I'm exploring a little more.

I think keeping a set of "path names" like #{Phaser.Cameras.Controls.Fixed.X, Phaser.Cameras.Controls.FixedKeyControl.Y} instead of a set of object references might work and would allow multiple properties to point to the same object (in Phaser specifically there are some deprecated properties, and even though they reference the same thing both the old and the new should be surfaced)

jmmk avatar May 07 '18 21:05 jmmk