-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deno.ppid
returns bigint, although type declarations says it's number
#22166
Labels
bug
Something isn't working correctly
Comments
This was referenced Jan 29, 2024
magurotuna
added a commit
that referenced
this issue
Jan 30, 2024
littledivy
pushed a commit
that referenced
this issue
Feb 1, 2024
This commit adds `ppid` getter for `node:process` to improve Node compatibility one step further. There is one problem though, which is that `Deno.ppid`, which `process.ppid` internally calls, is actually of type `bigint` although it's supposed to be `number`. I filed an issue for this (#22166). For the time being, explciit type conversion from `bigint` to `number` is applied to match the Node.js behavior.
littledivy
pushed a commit
that referenced
this issue
Feb 1, 2024
littledivy
pushed a commit
that referenced
this issue
Feb 1, 2024
This commit adds `ppid` getter for `node:process` to improve Node compatibility one step further. There is one problem though, which is that `Deno.ppid`, which `process.ppid` internally calls, is actually of type `bigint` although it's supposed to be `number`. I filed an issue for this (#22166). For the time being, explciit type conversion from `bigint` to `number` is applied to match the Node.js behavior.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
Deno.ppid
is supposed to have type ofnumber
(according to https://deno.land/[email protected]?s=Deno.ppid), but what we get actually isbigint
.What happens now
Version: Deno 1.40.2
Expected result
typeof Deno.ppid === "number"
Additional note
Deno.pid
(not ppid) is of typenumber
as expected.Deno.ppid
is of typenumber
if we run it in Deno Deploy.The text was updated successfully, but these errors were encountered: