javascript-externs-generator
javascript-externs-generator copied to clipboard
Invalid externs for Quill
Generating externs for Quill 1.1.0 doesn't include methods from Quill API. It also generates invalid js:
Quill.imports / formats / list / item.prototype = { ....
Which was generated based on this source from Quill:
_core2.default.register({
...
'formats/list/item': _list.ListItem,
@smogg thanks for the report.
Interesting, I guess the correct JS is:
Quill['imports']['formats/list/item'].prototype = { ...
but I don't think this is valid in an extern. In that case, perhaps these can be excluded from the extern altogether (somewhat related to #22). Not sure.
As for the Quill API functions... it looks like they are instance methods (new Quill().deleteText()
) rather than being static calls (Quill.deleteText()
) which I currently don't handle. I'm not 100% sure that those need to be in an extern, but #29 seems to provide some evidence that they do.
Same for the "ACE Editor" (https://ace.c9.io/), btw.
I've fixed the invalid format in https://github.com/jmmk/javascript-externs-generator/commit/0fcc0df8a08d5dfd6760a10d9885bed11033cba9
instance methods are still not handled