GeezerVison is showing github.com — Revert "extract `ModuleFormat` type" · nodejs/node@f83ea63
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: lib/internal/modules/cjs/loader.js +2-6Lines changed: 2 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1108,14 +1108,10 @@ function resolveForCJSWithHooks(specifier, parent, isMain) { |
1108 | 1108 | * @typedef {import('internal/modules/customization_hooks').ModuleLoadResult} ModuleLoadResult; |
1109 | 1109 | */ |
1110 | 1110 |
|
1111 | | -/** |
1112 | | - * @typedef {'module'|'commonjs'|'commonjs-typescript'|'module-typescript'|'typescript'} ModuleFormat; |
1113 | | - */ |
1114 | | - |
1115 | 1111 | /** |
1116 | 1112 | * Load the source code of a module based on format. |
1117 | 1113 | * @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. |
1119 | 1115 | * @returns {string|null} |
1120 | 1116 | */ |
1121 | 1117 | function defaultLoadImpl(filename, format) { |
@@ -1686,7 +1682,7 @@ function wrapSafe(filename, content, cjsModuleInstance, format) { |
1686 | 1682 | * `exports`) to the file. Returns exception, if any. |
1687 | 1683 | * @param {string} content The source code of the module |
1688 | 1684 | * @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. |
1690 | 1686 | */ |
1691 | 1687 | Module.prototype._compile = function(content, filename, format) { |
1692 | 1688 | if (format === 'commonjs-typescript' || format === 'module-typescript' || format === 'typescript') { |
|