Skip to content

Commit

Permalink
remove use of unref
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly-t committed Dec 26, 2022
1 parent d7cf17a commit 4ccb7be
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iter-ops",
"version": "3.0.6",
"version": "3.0.7",
"description": "Basic operations on iterables",
"keywords": [
"typescript",
Expand Down
13 changes: 3 additions & 10 deletions src/ops/async/delay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,9 @@ function delayAsync<T>(
: timeout;
return delay < 0
? a
: new Promise((resolve) => {
const timeoutId = setTimeout(
() => resolve(a),
delay
);
// istanbul ignore else;
if (typeof timeoutId.unref === 'function') {
timeoutId.unref();
}
});
: new Promise((resolve) =>
setTimeout(() => resolve(a), delay)
);
});
},
};
Expand Down
4 changes: 0 additions & 4 deletions src/ops/timeout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ function timeoutAsync<T>(
}
resolutions.forEach((r) => r({value: undefined, done}));
}, ms);
// istanbul ignore else;
if (typeof timeoutId.unref === 'function') {
timeoutId.unref();
}
return {
next(): Promise<IteratorResult<T>> {
if (done) {
Expand Down
2 changes: 1 addition & 1 deletion typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://typedoc.org/schema.json",
"name": "ITER-OPS v3.0.6",
"name": "ITER-OPS v3.0.7",
"out": "../iter-ops-docs",
"excludeExternals": true,
"excludePrivate": true,
Expand Down

0 comments on commit 4ccb7be

Please sign in to comment.