Skip to content

Commit a2e600d

Browse files
authored
fix: closes #5115 (#5116)
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
1 parent 3735873 commit a2e600d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/reporters/base.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ var generateDiff = (exports.generateDiff = function (actual, expected) {
227227
* @private
228228
* @param {Error} err
229229
* @param {Set<Error>} [seen]
230-
* @return {{ message: string, msg: string, stack: string }}
230+
* @return {FullErrorStack}
231231
*/
232232
var getFullErrorStack = function (err, seen) {
233233
if (seen && seen.has(err)) {
@@ -580,3 +580,12 @@ function sameType(a, b) {
580580
Base.consoleLog = consoleLog;
581581

582582
Base.abstract = true;
583+
584+
/**
585+
* An object with all stack traces recursively mounted from each err.cause
586+
* @memberof module:lib/reporters/base
587+
* @typedef {Object} FullErrorStack
588+
* @property {string} message
589+
* @property {string} msg
590+
* @property {string} stack
591+
*/

0 commit comments

Comments
 (0)