Skip to content

Commit

Permalink
fix: closes #5115
Browse files Browse the repository at this point in the history
Eleventy wasn't being able to parse the JSDocs for the returned type
on the getFullErrorStack function. Defining it as a new type and then
referencing it on the function fixes the issue
  • Loading branch information
LcsK committed Mar 7, 2024
1 parent 3735873 commit 3c87cba
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/reporters/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ var generateDiff = (exports.generateDiff = function (actual, expected) {
* @private
* @param {Error} err
* @param {Set<Error>} [seen]
* @return {{ message: string, msg: string, stack: string }}
* @return {FullErrorStack}
*/
var getFullErrorStack = function (err, seen) {
if (seen && seen.has(err)) {
Expand Down Expand Up @@ -580,3 +580,12 @@ function sameType(a, b) {
Base.consoleLog = consoleLog;

Base.abstract = true;

/**
* An object with all stack traces recursively mounted from each err.cause
* @memberof module:lib/reporters/base
* @typedef {Object} FullErrorStack
* @property {string} message
* @property {string} msg
* @property {string} stack
*/

0 comments on commit 3c87cba

Please sign in to comment.