mirror of
https://github.com/videojs/video.js.git
synced 2024-11-21 17:46:35 +02:00
fix(docs): Add workaround for ErrorMetadata typedef (#8737)
This commit is contained in:
parent
35de64ceb0
commit
4de09e4335
@ -61,6 +61,7 @@ module.exports = {
|
||||
plugins: [
|
||||
'plugins/markdown',
|
||||
'build/jsdoc-typeof-plugin',
|
||||
'build/jsdoc-workarounds',
|
||||
],
|
||||
markdown: {
|
||||
tags: ['example'],
|
||||
|
13
build/jsdoc-workarounds.js
Normal file
13
build/jsdoc-workarounds.js
Normal 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'
|
||||
);
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user