Skip to content

doc: fix callback example import in fs documentation#63912

Open
Rawal27 wants to merge 1 commit into
nodejs:mainfrom
Rawal27:doc-fs-fix-callback-import
Open

doc: fix callback example import in fs documentation#63912
Rawal27 wants to merge 1 commit into
nodejs:mainfrom
Rawal27:doc-fs-fix-callback-import

Conversation

@Rawal27

@Rawal27 Rawal27 commented Jun 14, 2026

Copy link
Copy Markdown

Summary

The CommonJS example in the "Ordering of callback and promise-based operations"
section demonstrates callback-based usage but imports rename and stat
from node:fs/promises.

Since callback-based APIs are provided by node:fs, the example should
import from node:fs instead.

This change aligns the CommonJS example with the equivalent ESM example
and the callback API being demonstrated.

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. labels Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants