Coder Social home page Coder Social logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
@method isn't a recognized tag in JsDoc Toolikit 1.0, that is, it goes into the
general tags array so it's there, but the parser just ignores it (this in spite 
of
the fact that it worked in previous versions). However, with the new parser in 
1.0,
it's rare that you actually that you actually need it.

I need more code before I can tell what you are trying to do but I'll guess it's
something like this...

foo.prototype = {
    /** 
     * Method that will be called to start the application
     * @method
     */       
    start:  function(){ 
        // some coding
    }
}

Which is results in "start" being documented as a method of "foo" with or 
without the
@method tag (because the tag is ignored).

If you can provide a more complete example that proves the @method tag is 
actually
required, I'll consider adding it.


Original comment by micmath on 7 Jul 2007 at 7:12

from jsdoc-toolkit.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024

Original comment by micmath on 7 Jul 2007 at 7:13

  • Changed state: MoreInformationRequired

from jsdoc-toolkit.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
Hi,

Actually my code is like this :


var foo1 = Class.create();
/* create inheritance */
Object.extend(foo1.prototype,foo2.prototype);
Object.extend(foo1.prototype,{
   /** Method that will be called to start the application */
   start: function(){
      // some coding
   }
}

I tried it also by removing @method (like example), but it is still not 
documented.

After document generation, 'Constructor' is filled in correct and 'Objects', 
but 
the 'Function' part is empty and I don't see a 'Method' part.

Any ideas?

Thanks and kr.

Original comment by [email protected] on 9 Jul 2007 at 7:58

from jsdoc-toolkit.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
Hi again,

after some testing I noticed that all methods are well documented, except in 
classes 
which inherit from other classes (like the example above). Can this be fixed?

Thanks.

Original comment by [email protected] on 9 Jul 2007 at 2:54

from jsdoc-toolkit.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
Hello,

Your example is not standard JavaScript, that is it uses some syntax that is 
not part
of the standard JavaScript language. So you'll need to use some slightly fancy 
tags:
the @scope tag to tell the parser what your object literal will be named, and 
the
@memberof tag to tell the parser that "start" is a method.

Inheritance documentation is not yet implemented in JsDoc Toolkit, but is 
slated to
appear in release 1.1. It will use the @extends tag, as in /** @extends foo2 */

Note that @class is a synonym for @constructor, I used it here because it 
seemed to
fit your syntax.

---- 

/** @class */
var foo1 = Class.create();

/* create inheritance, not yet implemented in jsdoc */
Object.extend(foo1.prototype, foo2.prototype);

Object.extend(foo1.prototype,
    /** @scope foo1 */
    {
        /**
            Method that will be called to start the application
            @memberof foo1
        */
        start: function(){
        }
    }
)

----

Regards,
Michael

Original comment by micmath on 9 Jul 2007 at 8:01

  • Changed state: WontFix
  • Added labels: Type-Other
  • Removed labels: Type-Defect

from jsdoc-toolkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.