[ 5 posts ]

Peter Foti

  • Username: Fotiman
  • Joined: Thu Sep 17, 2009 10:09 am
  • Posts: 128
  • Offline
  • Profile

What's the best way to document an enum?

Post Posted: Fri Nov 06, 2009 11:22 am
+0-
For example, given the following:

var MyEnum = {
foo: 1,
bar: 2,
baz: 3
};

What would be the best way to document that? With @class on MyEnum, and then @property on foo, bar, and baz with the respective values in the description? Is there a more formal method, or plans to add enum support to YUIDoc?

Peter Foti

  • Username: Fotiman
  • Joined: Thu Sep 17, 2009 10:09 am
  • Posts: 128
  • Offline
  • Profile

Re: What's the best way to document an enum?

Post Posted: Tue Nov 17, 2009 10:55 am
+0-
Bump...

Adam Moore

YUI Contributor

  • Username: adam
  • Joined: Wed Sep 03, 2008 11:16 am
  • Posts: 356
  • GitHub: apm
  • Gists: apm
  • Offline
  • Profile

Re: What's the best way to document an enum?

Post Posted: Tue Nov 17, 2009 1:38 pm
+0-
Yes, @class/@property is what you should use for an artificial enum.

Alexandre Morgaut

  • Username: Alexandre.Morgaut
  • Joined: Tue Sep 15, 2009 7:02 am
  • Posts: 8
  • Location: Paris, France
  • Twitter: amorgaut
  • GitHub: AMorgaut
  • Gists: AMorgaut
  • Offline
  • Profile

Re: What's the best way to document an enum?

Post Posted: Tue Apr 13, 2010 1:44 pm
+0-
I would add @static to @property as these properties are intances properties

Alexandre Morgaut

  • Username: Alexandre.Morgaut
  • Joined: Tue Sep 15, 2009 7:02 am
  • Posts: 8
  • Location: Paris, France
  • Twitter: amorgaut
  • GitHub: AMorgaut
  • Gists: AMorgaut
  • Offline
  • Profile

Re: What's the best way to document an enum?

Post Posted: Tue Apr 13, 2010 1:45 pm
+0-
Well I meant these properties are NOT intances properties ;-)
  [ 5 posts ]
Display posts from previous:  Sort by  
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