Skip to content

Commit f83ea63

Browse files
committed
Revert "extract ModuleFormat type"
This reverts commit 82f07ba.
1 parent c277f3f commit f83ea63

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/internal/modules/cjs/loader.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -1108,14 +1108,10 @@ function resolveForCJSWithHooks(specifier, parent, isMain) {
11081108
* @typedef {import('internal/modules/customization_hooks').ModuleLoadResult} ModuleLoadResult;
11091109
*/
11101110

1111-
/**
1112-
* @typedef {'module'|'commonjs'|'commonjs-typescript'|'module-typescript'|'typescript'} ModuleFormat;
1113-
*/
1114-
11151111
/**
11161112
* Load the source code of a module based on format.
11171113
* @param {string} filename Filename of the module.
1118-
* @param {ModuleFormat|undefined|null} format Format of the module.
1114+
* @param {string|undefined|null} format Format of the module.
11191115
* @returns {string|null}
11201116
*/
11211117
function defaultLoadImpl(filename, format) {
@@ -1686,7 +1682,7 @@ function wrapSafe(filename, content, cjsModuleInstance, format) {
16861682
* `exports`) to the file. Returns exception, if any.
16871683
* @param {string} content The source code of the module
16881684
* @param {string} filename The file path of the module
1689-
* @param {ModuleFormat} format Intended format of the module.
1685+
* @param {'module'|'commonjs'|'commonjs-typescript'|'module-typescript'|'typescript'} format Intended format of the module.
16901686
*/
16911687
Module.prototype._compile = function(content, filename, format) {
16921688
if (format === 'commonjs-typescript' || format === 'module-typescript' || format === 'typescript') {

0 commit comments

Comments
 (0)