mirror of
				https://github.com/videojs/video.js.git
				synced 2025-10-31 00:08:01 +02:00 
			
		
		
		
	fix(docs): Add workaround for ErrorMetadata typedef (#8737)
This commit is contained in:
		| @@ -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' | ||||
|     ); | ||||
|   } | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user