P
P
Pavel2422021-03-09 09:46:39
JavaScript
Pavel242, 2021-03-09 09:46:39

What is the correct way to add functionality to an object and describe it in jsdoc?

There is a file with the following structure

var API = (function(){
 ....
   return {
      method1: function(){...},
      method2: function(){...},
 ...
   };

})();

All methods are documented with jsdoc. Wanting to expand the functionality, I wrote my method in a separate file. In the Visual Studio Code editor, this method is not visible in the API object. Can anything be done?
API.myMethod = function(){...};

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question