GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Revert "extract `ModuleFormat` type" · nodejs/node@f83ea63

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/modules/cjs
    • loader.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/modules/cjs/loader.js‎

Copy file name to clipboardExpand all lines: lib/internal/modules/cjs/loader.js
+2-6Lines changed: 2 additions & 6 deletions
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 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.