module: fix jsdoc for `format` parameter in cjs/loader

PR-URL: https://github.com/nodejs/node/pull/56501
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
pull/56613/head
pacexy 2025-01-15 18:25:46 +08:00 committed by GitHub
parent e799ebd7ff
commit c8df98d2f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -1682,9 +1682,8 @@ function wrapSafe(filename, content, cjsModuleInstance, format) {
* `exports`) to the file. Returns exception, if any.
* @param {string} content The source code of the module
* @param {string} filename The file path of the module
* @param {
* 'module'|'commonjs'|'commonjs-typescript'|'module-typescript'
* } format Intended format of the module.
* @param {'module'|'commonjs'|'commonjs-typescript'|'module-typescript'|'typescript'} format
* Intended format of the module.
*/
Module.prototype._compile = function(content, filename, format) {
if (format === 'commonjs-typescript' || format === 'module-typescript' || format === 'typescript') {