| Page 1 of 1 | [ 3 posts ] |
|
After writing a bunch of YUI Doc documentation, I'm finding myself routinely wanting to just be able to do this:
@property {Foo} foo Instead of: @property foo @type Foo Since in the most common cases -- methods that take parameters -- I can put the type inline via brackets: @method example @param {Bar} bar The bar value. @param {Baz} baz The baz value. @return {Foo} foo The foo of the two. So for properties, configs and attributes, do you guys think it might be possible to accept @property {type} name in addition to an explicit @type tag (needed for backwards compat)? Aseem |
|
I think your idea is very logical and sounds fair
The only thing is that @type should still be supported as it is used by other doc generators and quite well know By the way, an other notation might be accepted, as we have @method foo @return {Number} you might want to write @property bar @return {Number} Technically, when we get the value of a property, it is returned by is internal getter function (which can be specified via the new ECMAScript 5 Object methods) |
|
Sorry, thinking back to it I didn't found Object.create and defineProperty doesn't allow to set getters and setters... here where I found an example of working code which make it possible for some specific engines:
http://ejohn.org/blog/javascript-getters-and-setters/ But well there still is an internal [[Get]] method to access property values |
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group