How to document callbacks using JSDoc?

In JSDoc 3.1 and later, you can use the new @callback tag to describe the callback function in a separate comment block. You can then refer to the callback in the docs for your method. Here’s an example: /** @class */ function MyClass() {} /** * Do something. * @param {MyClass~onSuccess} cb – Called on … Read more

JSDoc typedef in a separate file

You can define types in a module (eg. typedefs.js). The module contains your JSDoc typedefs and can simply export an unused property. // typedefs.js /** * @typedef foo * @property {string} bar */ // etc. exports.unused = {}; // or export {}; To use it, import the module where you need to reference these typedefs: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)