1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-21 01:39:04 +02:00

fix(docs): Add workaround for ErrorMetadata typedef (#8737)

This commit is contained in:
mister-ben 2024-05-23 19:04:25 +02:00 committed by GitHub
parent 35de64ceb0
commit 4de09e4335
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -61,6 +61,7 @@ module.exports = {
plugins: [
'plugins/markdown',
'build/jsdoc-typeof-plugin',
'build/jsdoc-workarounds',
],
markdown: {
tags: ['example'],

View File

@ -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'
);
}
};