Class transform does not recognize namespacing #146

nojvek opened this Issue Jul 7, 2016 · 1 comment


None yet

2 participants

nojvek commented Jul 7, 2016 edited

I was looking into turning chrome devtools code to ES6 classes

Their format is something like

 * @constructor
 * @implements {WebInspector.ContextMenu.Provider}
WebInspector.HandlerRegistry.ContextMenuProvider = function()

WebInspector.HandlerRegistry.ContextMenuProvider.prototype = {
     * @override
     * @param {!Event} event
     * @param {!WebInspector.ContextMenu} contextMenu
     * @param {!Object} target
    appendApplicableItems: function(event, contextMenu, target)
        WebInspector.openAnchorLocationRegistry._appendContentProviderItems(contextMenu, target);
        WebInspector.openAnchorLocationRegistry._appendHrefItems(contextMenu, target);

which I would expect to turn into

WebInspector.HandlerRegistry.ContextMenuProvider = class ContextMenuProvider {
   constructor() {

   appendApplicableItems(event, contextMenu, target) {

If someone could guide me, I could work on a PR.

nene commented Jul 7, 2016 edited

This is essentially the same issue as #113 (I closed that one, and changed the title of this one, as I think it better describes the issue).

The only guidance I can give, is that you'll have to look into the class transform. I'm not really sure about the best route for implementing this.

@nene nene changed the title from Prototype object definitions are not recognized to Class transform does not recognize namespacing Jul 7, 2016
@nene nene added the enhancement label Jul 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment