Skip to content

module.isPreloading doc doesn't match implementation #36775

Description

@Flarna
  • Version: 15.5.0
  • Platform: all
  • Subsystem: module

What steps will reproduce the bug?

isPreloading is documented in the Modules API section similar as e.g. createRequire but actually it's not implemented as static API of module. It is implemented as prototype method:

const { isPreloading, createRequire } = require("module")
console.log(isPreloading, module.isPreloading) // prints undefined, false
console.log(createRequire, module.createRequire) // prints [Function: createRequire] undefined

How often does it reproduce? Is there a required condition?

always

What is the expected behavior?

docs and implementation should match

What do you see instead?

docs/impl doesn't match

Additional information

Refs: #36263

fyi @jasnell

Metadata

Metadata

Assignees

No one assigned

    Labels

    moduleIssues and PRs related to the module subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions