forked from videojs/video.js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docs): Add workaround for ErrorMetadata typedef
- Loading branch information
1 parent
f05769d
commit 806faae
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* This jsdoc plugin works around some typescript-flavoured jsdoc that isn't actual jsdoc, | ||
* so docs:api doesn't fail | ||
*/ | ||
exports.handlers = { | ||
jsdocCommentFound: event => { | ||
// Special case for media-error.js | ||
event.comment = (event.comment || '').replace( | ||
'@typedef {{errorType: string, [key: string]: any}} ErrorMetadata', | ||
'@typedef {Object} ErrorMetadata\n * @property {string} errorType Error type' | ||
); | ||
} | ||
}; |