Comments (6)
For the sake of simplicity for me, locally i just comment these lines in js-comments
.
from parse-code-context.
@olstenlarck thanks for the additional information. It looks like the regex in some of the parsers just needs to be updated to also capture async
functions and categorize them with the proper .type
. Pretty much what you said originally, but I didn't understand entirely what the issue was. If you'd like to do a PR, that'd be appreciated.
from parse-code-context.
Current workaround is to create another function that just calls the async one and to put the comment on top it.
/**
* jsdoc comment here
*/
module.exports = function charlike(...args) {
return charlikeOrig(...args);
};
from parse-code-context.
Actually the dot comes from js-comments here.
from parse-code-context.
@olstenlarck what's the issue that you're actually having? Are async
functions causing an error? Can you provide an example of the function, the code comments, and the output?
from parse-code-context.
Yea, sorry.
/**
* Foo bar baz.
*
* @param {String} `<name>` project name
* @param {String} `<desc>` project description
* @param {Object} `[options]` use `options.locals` to pass more context to template files,
* use `options.engine` for different template engine to be used
* in template files, or pass `options.render` function
* to use your favorite engine
* @return {Promise} if successful, resolved promise with absolute path to the project
* @api public
*/
export default async function charlike(name, desc, options) {
if (typeof name !== 'string') {
throw new TypeError('charlike: expect `name` to be string');
}
// ...
}
Does not outputs API. So you can set @name
but when you set it, it automatically adds .
in front of what you set, so in the docs it shows .charlike
and that problem comes from js-comments
. It is nice default behaviour, but for methods and etc, not when you don't have any other way to set name and when you want to describe default export.
from parse-code-context.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parse-code-context.