File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -2042,7 +2042,7 @@ This function remove the register of the object from the finalization
2042
2042
registry, so the callback will not be called anymore.
2043
2043
2044
2044
` ` ` cjs
2045
- const { finalization , stdout } = require (' node:process' );
2045
+ const { finalization } = require (' node:process' );
2046
2046
2047
2047
// Please make sure that the function passed to finalization.register()
2048
2048
// does not create a closure around unnecessary objects.
@@ -2058,7 +2058,6 @@ function setup() {
2058
2058
const myDisposableObject = {
2059
2059
dispose () {
2060
2060
// Free your resources synchronously
2061
- stdout .write (' disposed.\n ' );
2062
2061
},
2063
2062
};
2064
2063
@@ -2074,7 +2073,7 @@ setup();
2074
2073
` ` `
2075
2074
2076
2075
` ` ` mjs
2077
- import { finalization , stdout } from ' node:process' ;
2076
+ import { finalization } from ' node:process' ;
2078
2077
2079
2078
// Please make sure that the function passed to finalization.register()
2080
2079
// does not create a closure around unnecessary objects.
@@ -2090,7 +2089,6 @@ function setup() {
2090
2089
const myDisposableObject = {
2091
2090
dispose () {
2092
2091
// Free your resources synchronously
2093
- stdout .write (' disposed.\n ' );
2094
2092
},
2095
2093
};
2096
2094
You can’t perform that action at this time.
0 commit comments