You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If file has some class and function that returns an instance of this class then it should export not only function but also class itself. Otherwise, metadoc won't be able to generate documentation for this class. And documentation should be generated because it will be confusing to have docs for the function that returns the class instance but don't have documentation for that class. For example:
// Class descriptionclassSomeClass{// constructor descriptionconstructor(){}// Method descriptionmethod(){}}// Get SomeClass instance// Returns: <SomeClass>constgetSomeClassInstance=()=>newSomeClass();module.exports={ getSomeClassInstance };
If file has some class and function that returns an instance of this class then it should export not only function but also class itself. Otherwise,
metadoc
won't be able to generate documentation for this class. And documentation should be generated because it will be confusing to have docs for the function that returns the class instance but don't have documentation for that class. For example:/cc @tshemsedinov @belochub @nechaido @lundibundi
Edit: Examples can be found here:
metasync
https://github.com/metarhia/metasync/blob/master/lib/chain.jshttps://github.com/metarhia/metasync/blob/master/lib/collector.class.js
https://github.com/metarhia/metasync/blob/master/lib/collector.functor.js
https://github.com/metarhia/metasync/blob/master/lib/collector.jshttps://github.com/metarhia/metasync/blob/master/lib/composition.js
https://github.com/metarhia/metasync/blob/master/lib/memoize.js
https://github.com/metarhia/metasync/blob/master/lib/queue.js
commonhttps://github.com/metarhia/common/blob/master/lib/cache.js
https://github.com/metarhia/common/blob/master/lib/events.js
https://github.com/metarhia/common/blob/master/lib/iterator.js
metaschemahttps://github.com/metarhia/metaschema/blob/master/lib/schema.js
metalog
https://github.com/metarhia/metalog/blob/master/metalog.js
The text was updated successfully, but these errors were encountered: