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
The doc shows duplicated exports on some of the functions(e.g. errorMute), while some of the function written in the same way doesn't have this problem(e.g. eventLogger).
/** * @template T * @typedef {import('./types').ErrorHookMethod<T>} ErrorHookMethod */
If I import directly at the function comment, there is no duplicate but the imported type is not parsed correctly as casted to any even if it is not importing a generic type
/** * A decorator to mute errors when conditions are met. * * @param {object} options - Config. * @param {import('./types').ErrorHookMethod<boolean>} [options.condition] - Condition to mute the error. * @returns {Error|object|undefined} - If the error is muted(not thrown to upper level) it is accessible in the return value. */
the setup:
documentation.js - latest version, ran on CLI with/without --shallow flag
jsdoc linted via eslint-plugin-jsdoc with typescript mode enabled
implementation style: object destruct assign function parameter with default values
The text was updated successfully, but these errors were encountered:
Update: put the type import and function type comment in one section solves the problem
/** * A decorator to mute errors when conditions are met. * * @template T * @typedef {import('./types').ErrorHookMethod<T>} ErrorHookMethod * * @param {object} options - Config. * @param {ErrorHookMethod<boolean>} [options.condition] - Condition to mute the error. * @returns {Error|object|undefined} - If the error is muted(not thrown to upper level) it is accessible in the return value. */
Uh oh!
There was an error while loading. Please reload this page.
The doc shows duplicated exports on some of the functions(e.g. errorMute), while some of the function written in the same way doesn't have this problem(e.g. eventLogger).
source code can be found here
errorMute
eventLogger
It is probably caused by jsdoc type import
If I import directly at the function comment, there is no duplicate but the imported type is not parsed correctly as casted to
any
even if it is not importing a generic typethe setup:
The text was updated successfully, but these errors were encountered: