Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove stdout usages
  • Loading branch information
H4ad committed Jul 11, 2024
commit 8002996d5ef8b1b7c59faba515573390eabe0986
6 changes: 2 additions & 4 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@ This function remove the register of the object from the finalization
registry, so the callback will not be called anymore.

```cjs
const { finalization, stdout } = require('node:process');
const { finalization } = require('node:process');

// Please make sure that the function passed to finalization.register()
// does not create a closure around unnecessary objects.
Expand All @@ -2058,7 +2058,6 @@ function setup() {
const myDisposableObject = {
dispose() {
// Free your resources synchronously
stdout.write('disposed.\n');
},
};

Expand All @@ -2074,7 +2073,7 @@ setup();
```

```mjs
import { finalization, stdout } from 'node:process';
import { finalization } from 'node:process';

// Please make sure that the function passed to finalization.register()
// does not create a closure around unnecessary objects.
Expand All @@ -2090,7 +2089,6 @@ function setup() {
const myDisposableObject = {
dispose() {
// Free your resources synchronously
stdout.write('disposed.\n');
},
};

Expand Down