Code Monkey home page Code Monkey logo

Comments (10)

0x-r4bbit avatar 0x-r4bbit commented on May 21, 2024

If I'm getting this right, there seems to be a conflict with the defaultFn and the transformFn. Here, we can see, that a @method doc actually requires a @memberof tag. https://github.com/angular/dgeni-packages/blob/master/jsdoc/tag-defs/index.js#L12-L22

from dgeni-packages.

petebacondarwin avatar petebacondarwin commented on May 21, 2024

So what this is saying is that @memberOf must and can only appear on docs that have docType of property, method or event. In your example, providing the @method tag does not set the docType.

Arguably this is an ngdoc specific thing. So we should move this check into that package

from dgeni-packages.

0x-r4bbit avatar 0x-r4bbit commented on May 21, 2024

So how do one set a doctype?

from dgeni-packages.

petebacondarwin avatar petebacondarwin commented on May 21, 2024

With @ngdoc :-(
On 9 Apr 2014 09:36, "Pascal Precht" [email protected] wrote:

So how do one set a doctype?

Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-39940380
.

from dgeni-packages.

0x-r4bbit avatar 0x-r4bbit commented on May 21, 2024

m( ... okay. So does that also mean that the docType is an ngdoc specific thing in general? I mean the entire mechanism that works with docType.

from dgeni-packages.

0x-r4bbit avatar 0x-r4bbit commented on May 21, 2024

Sorry man, I was confused. I think I can close this now.

from dgeni-packages.

0x-r4bbit avatar 0x-r4bbit commented on May 21, 2024

Okay, I think I have to get back to this issue. So, setting the docType happens through annotations like:

/**
 * @ngdoc service // or module, class, method etc.
 *
**/

This seems to be possible, because in the ngdoc package, the tag definition for @ngdoc tags looks like this:

{
  name: 'ngdoc',
  required: true,
  docProperty: 'docType'
}

Now, if I wanna have a custom tag that behaves the same, my tag definition has to look like this right? Is there anything else that has to be done, so that the error doesn't occur?

The reason why I'm asking is, that I wanna make our @sofadoc tag behave the same. It should set the docType like @sofadoc method, or @sofadoc class. I don't understand why, but in cases where the docType is class everything works fine. When I say @sofadoc method in combination with @memberof sofa, I still get the error. It turns out that docType is undefined.

Any idea @petebacondarwin ?

from dgeni-packages.

petebacondarwin avatar petebacondarwin commented on May 21, 2024

The order of the typedefs is important
On 11 Apr 2014 14:18, "Pascal Precht" [email protected] wrote:

Okay, I think I have to get back to this issue. So, setting the docTypehappens through annotations like:

/** * @ngdoc service // or module, class, method etc. ***/

This seems to be possible, because in the ngdoc package, the tag
definition for @ngdoc tags looks like this:

{
name: 'ngdoc',
required: true,
docProperty: 'docType'}

Now, if I wanna have a custom tag that behaves the same, my tag definition
has to look like this right? Is there anything else that has to be done, so
that the error doesn't occur?

The reason why I'm asking is, that I wanna make our @sofadoc tag behave
the same. It should set the docType like @sofadoc method, or @sofadoc
class. I don't understand why, but in cases where the docType is classeverything works fine. When I say @sofadoc
method in combination with @memberof sofa, I still get the error. It
turns out that docType is undefined.

Any idea @petebacondarwin https://github.com/petebacondarwin ?

Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-40202068
.

from dgeni-packages.

0x-r4bbit avatar 0x-r4bbit commented on May 21, 2024

Typedefs? Or do you mean tag defs, if so, how does the order have to be? Sorry, I don't wanna annoy you with this topic, but I really try to get my head around it.

from dgeni-packages.

petebacondarwin avatar petebacondarwin commented on May 21, 2024

TagDefs!
The tag-extractor processor just runs through each tagDef one at a time and processes them. If you need one tagDef to provide a property that is checked in a later tag def then they need to be in the right order

This is one of the reasons for the separation of tag-parsing from tag-extracting. Tags appear in a doc in an undefined order, when they are parsed, but they need to be extracted in a well defined order.

from dgeni-packages.

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.