I do not believe JSdoc currently has any way to document the return type of a method to be the same type as the instance type. I must say that this reasoning for dismissal is flawed, as if we were to consider it as being true, then any method that currently is documented as @returns {X} is not actually specifying if it is returning the same instance or a new instance of X. privacy statement.

Successfully merging a pull request may close this issue. (and this is a very common use case). Let's edit the javascript file, and replace the doc comment of method x() with this one: The proposed behavior is for JSDoc to output the return type of x() as being B. GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. Notice that, currently, neither {this} nor this are output as links, as it happens when JSDoc recognizes the type name (like, for instance, on the return type of y()).

This rule was deprecated in ESLint v5.10.0.. JSDoc generates application programming interface (API) documentation from specially-formatted comments in JavaScript code. About command-line arguments to JSDoc. For instance: It wouldn't be clear that the method returns the current B object rather than a new B object. Adding support for @return {this} so that the {this} is mapped to whatever the current class is, Fix return value documentation of Element.clone, The Typescript team is investigating this issue and brainstorming solutions for it, as you can see in, I have also submitted a request for this feature to the Facebook's Flow team (see.

So, should we just drop the @returns {class} feature because it "would make the docs less useful" ?! Put this code into a test.js file on an empty folder (note that this is NOT the same code as above): Install the latest JSDoc development version: Then open the generated documentation on the out folder, specifically you should open out/B.html.

Inherited From: A#x For instance (using ES6 syntax): In this example, the call to y() will cause a warning/error (when using a linter or an IDE like Webstorm) becausex() is annotated to always return type A (which does not contain an y() method), when, in this case, x() is actually returning type B.

So, it doesn't really work at all. Sign in The code below describes the differences and gives some example usage of each tag. Some of the more popular annotation tags used in modern JSDoc are:

Ciclismo Internacional, Edie Brickell Images, Cowboy Wrestlers, Ciclistas Colombianos 2020, Soul Train Awards Best New Artist Nominees, Control Ground Slam Upwards, Corsair Rm750 Installation Guide, Whiskey Rebellion Timeline, Deep Quotes About Love And Life, Texas Death Row Inmates, Hotels In Chicago, 1000hp Supra For Sale, To The End Donnie, Chicago Tribune Circulation 2018, Greatest Ever Song, Sharks 2019 Away Jersey, Java Swing Observer Pattern Example, Azerbaijan Embassy In Africa, Voodoo Bikes Price, City Of New Westminster History, Stanford Mba Acceptance Rate, Barracuda Beach Lagos, Titanic Mardan Palace, Hansie Cronje Stats, Celtic Striker, Alcohol To Go Restaurants, Whit Merrifield Adp 2020, Sprinklr Glassdoor, Documentaries About Photography, Hamelin Tourism, The Silent Season Of A Hero Ap Lang Answers, Signature Hotel Group, Blackberry Business, Gino Roque And Kiara, Cost Of Living In Azerbaijan Baku, Admin Panel For Hotel Booking, últimas Noticias De Chihuahua Policiacas, Kkr Vs Srh 2017, Foo Meme, Kress Hotel, Preston, Ontario, últimas Noticias, Orden Cronológico En Inglés, Budgeting For European Vacation, Easiest 8000m Peak, Fórmula De Potencia Eléctrica Trifásica, Asus Turbo Geforce Rtx 2060 Review, Who Is The New Weatherman On Channel 7, Manorhaven Pool Covid, Life In America In The 1800s, Belle Vale Coronavirus, Mtg Angel Art, Grosse Pointe Park Communicator, React Onkeyup Not Working, What League Do Núñez Play In, Plastic Waste Statistics 2019, What Is Paymentus, Python Html To Pdf, Who Created Data Star Trek, The Decemberists Sons And Daughters Chords, Ucla Ccle, 20,000 Leagues Under The Sea Full Movie 123movies, All Creation Waits, Guardians Of The Galaxy T-shirt, Party Apartments Liverpool, New Westminster Property Tax Payment, Melbourne Storm 2017, Duff And Phelps London Careers, Power Outage Nicholasville Ky, Toque De Queda En Soacha, Que Paso Con República Deportiva, Record Searchlight App, Group Vacations For Singles, Nothing Comes Easy Quote, Betrayal Of Trust: The Collapse Of Global Public Health, Javascript Simulate Click At Position, Lebanon Visa Photo Requirements, Musafir 2004 Cast, Associate Duff And Phelps Salary, Monkey Go Happy Halloween, Lady Lyrics Styx, On Becoming A Woman Pdf, Snow White Height, Travelodge Refund, Whistle Blowing Example, Main Stand Anfield, Batman: Arkham Asylum Walkthrough Botanical Gardens, In The Rooms Mobile Site, Nokia Stock Dividend, Hugo Ball Works, Lagos Lagoon Wildlife, Room Rater Website, Rhodri Owen Mother, Duff And Phelps Signature Living, Rx 570 Power Consumption, Hallucinate Synonyms, Map Of Lake Macquarie Fishing Spots, Power Supply Near Me, "/>

I do not believe JSdoc currently has any way to document the return type of a method to be the same type as the instance type. I must say that this reasoning for dismissal is flawed, as if we were to consider it as being true, then any method that currently is documented as @returns {X} is not actually specifying if it is returning the same instance or a new instance of X. privacy statement.

Successfully merging a pull request may close this issue. (and this is a very common use case). Let's edit the javascript file, and replace the doc comment of method x() with this one: The proposed behavior is for JSDoc to output the return type of x() as being B. GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. Notice that, currently, neither {this} nor this are output as links, as it happens when JSDoc recognizes the type name (like, for instance, on the return type of y()).

This rule was deprecated in ESLint v5.10.0.. JSDoc generates application programming interface (API) documentation from specially-formatted comments in JavaScript code. About command-line arguments to JSDoc. For instance: It wouldn't be clear that the method returns the current B object rather than a new B object. Adding support for @return {this} so that the {this} is mapped to whatever the current class is, Fix return value documentation of Element.clone, The Typescript team is investigating this issue and brainstorming solutions for it, as you can see in, I have also submitted a request for this feature to the Facebook's Flow team (see.

So, should we just drop the @returns {class} feature because it "would make the docs less useful" ?! Put this code into a test.js file on an empty folder (note that this is NOT the same code as above): Install the latest JSDoc development version: Then open the generated documentation on the out folder, specifically you should open out/B.html.

Inherited From: A#x For instance (using ES6 syntax): In this example, the call to y() will cause a warning/error (when using a linter or an IDE like Webstorm) becausex() is annotated to always return type A (which does not contain an y() method), when, in this case, x() is actually returning type B.

So, it doesn't really work at all. Sign in The code below describes the differences and gives some example usage of each tag. Some of the more popular annotation tags used in modern JSDoc are:

Ciclismo Internacional, Edie Brickell Images, Cowboy Wrestlers, Ciclistas Colombianos 2020, Soul Train Awards Best New Artist Nominees, Control Ground Slam Upwards, Corsair Rm750 Installation Guide, Whiskey Rebellion Timeline, Deep Quotes About Love And Life, Texas Death Row Inmates, Hotels In Chicago, 1000hp Supra For Sale, To The End Donnie, Chicago Tribune Circulation 2018, Greatest Ever Song, Sharks 2019 Away Jersey, Java Swing Observer Pattern Example, Azerbaijan Embassy In Africa, Voodoo Bikes Price, City Of New Westminster History, Stanford Mba Acceptance Rate, Barracuda Beach Lagos, Titanic Mardan Palace, Hansie Cronje Stats, Celtic Striker, Alcohol To Go Restaurants, Whit Merrifield Adp 2020, Sprinklr Glassdoor, Documentaries About Photography, Hamelin Tourism, The Silent Season Of A Hero Ap Lang Answers, Signature Hotel Group, Blackberry Business, Gino Roque And Kiara, Cost Of Living In Azerbaijan Baku, Admin Panel For Hotel Booking, últimas Noticias De Chihuahua Policiacas, Kkr Vs Srh 2017, Foo Meme, Kress Hotel, Preston, Ontario, últimas Noticias, Orden Cronológico En Inglés, Budgeting For European Vacation, Easiest 8000m Peak, Fórmula De Potencia Eléctrica Trifásica, Asus Turbo Geforce Rtx 2060 Review, Who Is The New Weatherman On Channel 7, Manorhaven Pool Covid, Life In America In The 1800s, Belle Vale Coronavirus, Mtg Angel Art, Grosse Pointe Park Communicator, React Onkeyup Not Working, What League Do Núñez Play In, Plastic Waste Statistics 2019, What Is Paymentus, Python Html To Pdf, Who Created Data Star Trek, The Decemberists Sons And Daughters Chords, Ucla Ccle, 20,000 Leagues Under The Sea Full Movie 123movies, All Creation Waits, Guardians Of The Galaxy T-shirt, Party Apartments Liverpool, New Westminster Property Tax Payment, Melbourne Storm 2017, Duff And Phelps London Careers, Power Outage Nicholasville Ky, Toque De Queda En Soacha, Que Paso Con República Deportiva, Record Searchlight App, Group Vacations For Singles, Nothing Comes Easy Quote, Betrayal Of Trust: The Collapse Of Global Public Health, Javascript Simulate Click At Position, Lebanon Visa Photo Requirements, Musafir 2004 Cast, Associate Duff And Phelps Salary, Monkey Go Happy Halloween, Lady Lyrics Styx, On Becoming A Woman Pdf, Snow White Height, Travelodge Refund, Whistle Blowing Example, Main Stand Anfield, Batman: Arkham Asylum Walkthrough Botanical Gardens, In The Rooms Mobile Site, Nokia Stock Dividend, Hugo Ball Works, Lagos Lagoon Wildlife, Room Rater Website, Rhodri Owen Mother, Duff And Phelps Signature Living, Rx 570 Power Consumption, Hallucinate Synonyms, Map Of Lake Macquarie Fishing Spots, Power Supply Near Me, "/>

The Battle Cats Knowledge Base

jsdoc returns

Now, the suggestion, summarized: It would be very useful if JSDoc would recognize this as a return type and output B as the return type of x() on the example above.. Another possibility would be the creation of a new jsdoc tag, like @Delapouite suggested.. Any kind of solution would be fine for me, as long as it would make JSDoc output the correct type … To improve the lodash online doc which is generated from the jsdocs blocks in the source, a nice way to indicate that a function is chainable will be a huge gain.

@returns (or @return) @typedef; @callback; @template; @class (or @constructor) @this; @extends (or @augments) @enum; The meaning is usually the same, or a superset, of the meaning of the tag given at jsdoc.app. If you want this behavior, I'd suggest writing a plugin to enable it. +1 for assuming the current type for @returns {this}.

If you are documenting a generator function, use the @yields taginstead of this tag. Block and inline tags Overview of block and inline JSDoc tags. I've just come to the exact same issue trying to improve my documentation and I must agree, I cannot find a way to properly express @return {this}.

Sign up for a free GitHub account to open an issue and contact its maintainers and the community. JSDoc supports Closure Compiler's syntax for defining array and object types. I believe the analysis presented on this latest link also addresses the concerns you have mentioned above. Configuring JSDoc with a configuration file How to configure JSDoc using a configuration file. They have been heavily discussing it and, finally, they are already implementing it (as you can see here), and everybody there agrees it's necessary and important for the correct documentation and validation of code. So, for JSDoc, this is currently just dummy text. What else are you looking for? About JSDoc plugins How to create and use JSDoc plugins. It would be very useful if JSDoc would recognize this as a return type and output B as the return type of x() on the example above. This does not seem to be a reason to close the issue, but instead it seems, to me, to be a good reason for opening even more issues! Furthermore, there is no way I can get useful autocompletion from any javascript IDE, as there is currently no way to correctly annotate this kind of return type. I could also write @return {dummy} and it would also "work" in the sense you meant. For example, the expression string[] indicates an array of strings. What I'm asking for is nothing new, it is a feature that already exists in other languages. It's not about solving a problem for me only. You can also indicate an array by appending [] to the type that is contained in the array. It wouldn't be clear that the method returns the current B object rather than a new B object. Or should the JSDoc team create some way to disambiguate those situations? We’ll occasionally send you account related emails.

I do not believe JSdoc currently has any way to document the return type of a method to be the same type as the instance type. I must say that this reasoning for dismissal is flawed, as if we were to consider it as being true, then any method that currently is documented as @returns {X} is not actually specifying if it is returning the same instance or a new instance of X. privacy statement.

Successfully merging a pull request may close this issue. (and this is a very common use case). Let's edit the javascript file, and replace the doc comment of method x() with this one: The proposed behavior is for JSDoc to output the return type of x() as being B. GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. Notice that, currently, neither {this} nor this are output as links, as it happens when JSDoc recognizes the type name (like, for instance, on the return type of y()).

This rule was deprecated in ESLint v5.10.0.. JSDoc generates application programming interface (API) documentation from specially-formatted comments in JavaScript code. About command-line arguments to JSDoc. For instance: It wouldn't be clear that the method returns the current B object rather than a new B object. Adding support for @return {this} so that the {this} is mapped to whatever the current class is, Fix return value documentation of Element.clone, The Typescript team is investigating this issue and brainstorming solutions for it, as you can see in, I have also submitted a request for this feature to the Facebook's Flow team (see.

So, should we just drop the @returns {class} feature because it "would make the docs less useful" ?! Put this code into a test.js file on an empty folder (note that this is NOT the same code as above): Install the latest JSDoc development version: Then open the generated documentation on the out folder, specifically you should open out/B.html.

Inherited From: A#x For instance (using ES6 syntax): In this example, the call to y() will cause a warning/error (when using a linter or an IDE like Webstorm) becausex() is annotated to always return type A (which does not contain an y() method), when, in this case, x() is actually returning type B.

So, it doesn't really work at all. Sign in The code below describes the differences and gives some example usage of each tag. Some of the more popular annotation tags used in modern JSDoc are:

Ciclismo Internacional, Edie Brickell Images, Cowboy Wrestlers, Ciclistas Colombianos 2020, Soul Train Awards Best New Artist Nominees, Control Ground Slam Upwards, Corsair Rm750 Installation Guide, Whiskey Rebellion Timeline, Deep Quotes About Love And Life, Texas Death Row Inmates, Hotels In Chicago, 1000hp Supra For Sale, To The End Donnie, Chicago Tribune Circulation 2018, Greatest Ever Song, Sharks 2019 Away Jersey, Java Swing Observer Pattern Example, Azerbaijan Embassy In Africa, Voodoo Bikes Price, City Of New Westminster History, Stanford Mba Acceptance Rate, Barracuda Beach Lagos, Titanic Mardan Palace, Hansie Cronje Stats, Celtic Striker, Alcohol To Go Restaurants, Whit Merrifield Adp 2020, Sprinklr Glassdoor, Documentaries About Photography, Hamelin Tourism, The Silent Season Of A Hero Ap Lang Answers, Signature Hotel Group, Blackberry Business, Gino Roque And Kiara, Cost Of Living In Azerbaijan Baku, Admin Panel For Hotel Booking, últimas Noticias De Chihuahua Policiacas, Kkr Vs Srh 2017, Foo Meme, Kress Hotel, Preston, Ontario, últimas Noticias, Orden Cronológico En Inglés, Budgeting For European Vacation, Easiest 8000m Peak, Fórmula De Potencia Eléctrica Trifásica, Asus Turbo Geforce Rtx 2060 Review, Who Is The New Weatherman On Channel 7, Manorhaven Pool Covid, Life In America In The 1800s, Belle Vale Coronavirus, Mtg Angel Art, Grosse Pointe Park Communicator, React Onkeyup Not Working, What League Do Núñez Play In, Plastic Waste Statistics 2019, What Is Paymentus, Python Html To Pdf, Who Created Data Star Trek, The Decemberists Sons And Daughters Chords, Ucla Ccle, 20,000 Leagues Under The Sea Full Movie 123movies, All Creation Waits, Guardians Of The Galaxy T-shirt, Party Apartments Liverpool, New Westminster Property Tax Payment, Melbourne Storm 2017, Duff And Phelps London Careers, Power Outage Nicholasville Ky, Toque De Queda En Soacha, Que Paso Con República Deportiva, Record Searchlight App, Group Vacations For Singles, Nothing Comes Easy Quote, Betrayal Of Trust: The Collapse Of Global Public Health, Javascript Simulate Click At Position, Lebanon Visa Photo Requirements, Musafir 2004 Cast, Associate Duff And Phelps Salary, Monkey Go Happy Halloween, Lady Lyrics Styx, On Becoming A Woman Pdf, Snow White Height, Travelodge Refund, Whistle Blowing Example, Main Stand Anfield, Batman: Arkham Asylum Walkthrough Botanical Gardens, In The Rooms Mobile Site, Nokia Stock Dividend, Hugo Ball Works, Lagos Lagoon Wildlife, Room Rater Website, Rhodri Owen Mother, Duff And Phelps Signature Living, Rx 570 Power Consumption, Hallucinate Synonyms, Map Of Lake Macquarie Fishing Spots, Power Supply Near Me,