ClojureScript

^:export on a deftype/record method should goog.exportProperty

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Activity

Hide
Eduard Bondarenko added a comment -
(deftype ^:export SceneMain []
  Object
  (handleShow [_]
    (display-categories)))

I used exportSymbol:

(goog/exportSymbol "SceneMain" SceneMain)
(goog/exportSymbol "SceneMain.prototype.handleShow" SceneMain.prototype.handleShow)

It works even with advanced optimizations:

ca("SceneMain",mg);
ca("SceneMain.prototype.handleShow",SceneMain.prototype.Cb);
Show
Eduard Bondarenko added a comment -
(deftype ^:export SceneMain []
  Object
  (handleShow [_]
    (display-categories)))
I used exportSymbol:
(goog/exportSymbol "SceneMain" SceneMain)
(goog/exportSymbol "SceneMain.prototype.handleShow" SceneMain.prototype.handleShow)
It works even with advanced optimizations:
ca("SceneMain",mg);
ca("SceneMain.prototype.handleShow",SceneMain.prototype.Cb);
Hide
David Nolen added a comment -

It would be nice if the following worked:

(deftype ^:export SceneMain []
  Object
  (^:export handleShow [_]
    (display-categories)))
Show
David Nolen added a comment - It would be nice if the following worked:
(deftype ^:export SceneMain []
  Object
  (^:export handleShow [_]
    (display-categories)))

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated: