Commit 6168067
async_hooks: use validateBoolean for trackPromises
The `trackPromises` check duplicated `validateBoolean()` exactly: same
error code, same expected type string, same argument order. Replace it
with the validator, matching how this file already validates `type` and
`fn` via `validateString()`/`validateFunction()`.
`ERR_INVALID_ARG_TYPE` had no other use in this file, so drop the
import. Since `validateBoolean` is wrapped in `hideStackFrames()`, the
thrown error is unchanged from a caller's perspective.
Signed-off-by: Soul Lee <alus20x@gmail.com>
PR-URL: #64731
Refs: #61415
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>1 parent b95e5f9 commit 6168067
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
| 87 | + | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
0 commit comments