<< Back to previous view

[CLJS-698] ^:export on a deftype/record method should goog.exportProperty Created: 25/Nov/13  Updated: 28/Nov/13

Status: Open
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: David Nolen Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None


 Description   

See http://developers.google.com/closure/compiler/docs/api-tutorial3



 Comments   
Comment by Eduard Bondarenko [ 27/Nov/13 7:37 AM ]
(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);
Comment by David Nolen [ 28/Nov/13 8:03 AM ]

It would be nice if the following worked:

(deftype ^:export SceneMain []
  Object
  (^:export handleShow [_]
    (display-categories)))
Generated at Sat Oct 25 00:51:20 CDT 2014 using JIRA 4.4#649-r158309.