oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.16k stars 2.77k forks source link

`Bun.parseArgs` in typings is invalid #10659

Open teidesu opened 6 months ago

teidesu commented 6 months ago

What version of Bun is running?

1.1.6-canary.1+7af0ed164

What platform is your computer?

Darwin 23.2.0 arm64 arm

What steps can reproduce the bug?

const args = Bun.parseArgs(...)

when running, this errors because parseArgs is not in Bun namespace, but typescript doesn't show any errors.

What is the expected behavior?

typescript errors that parseArgs is not in the Bun namespace

What do you see instead?

it doesn't

Additional information

https://github.com/oven-sh/bun/blob/fbbc20fe83383eb89e4f9979cd0d1750e2e5b8d3/packages/bun-types/bun.d.ts#L4784

paperdave commented 6 months ago

this was originally going to be an alias but it was decided against, but it seems the type definition for this was never removed.

papidb commented 2 months ago

Hi @paperdave, I don't think this problem doesn't exist anymore.

I'm on version 1.1.22

image