Repository navigation
Create a basic jsdoc externs file for Polymer - #769
Conversation
This change is by jlklein@google.com
…radio-button. Note that the externs are dependent on the Polymer externs in the pull request at Polymer/polymer#769.
…. This is dependent on the externs for paper-radio-button (googlearchive/paper-radio-button#8) and Polymer (Polymer/polymer#769).
|
Taylor, we need to reroute this, I'm not the guy for externs. Maybe this goes to AJ? |
There was a problem hiding this comment.
Note we overload this too: Polymer({}) without a name is also valid (though not seen in the wild that frequently ...yet?). Not sure if that's worth it for the externs, though.
There was a problem hiding this comment.
My preference would be to punt on this for the moment, as the existing use cases I've seen for compilation would put the Polymer() calls far away and uncorrelated with the element declaration such that I suspect that it will not be possible to infer the name.
(ok, that and I don't know how to set up the types such that Polymer('hello-world', {}) and Polymer({}) are both accepted but Polymer({}, {}) is rejected)
There was a problem hiding this comment.
I think vulcanize handles this now by attaching a name to the containing element, and we respect that: https://github.com/Polymer/polymer-dev/blob/master/src/declaration/polymer.js#L25
However, I'm there with ya on making the type expression work :P Punt!
Addressing comments in the pull request. A couple more require more experimenting, followup commit coming.
There was a problem hiding this comment.
async also takes functions by name, and returns a handle (for cancelAsync): https://github.com/Polymer/polymer-dev/blob/master/src/instance/utils.js#L18-59
|
Alrighty, that's it from me |
No description provided.