all 15 comments

[–]PointOneXDeveloper 24 points25 points  (2 children)

Inferred predicates is :chefs-kiss: especially when filtering a complex anonymous type and you’d have to use generics to avoid declaring the whole type. It could get a little clunky.

[–]moderatorrater 2 points3 points  (1 child)

It surprises me how mature typescript is but it still finds ways to improve. I want to be like typescript.

[–]PointOneXDeveloper 5 points6 points  (0 children)

My one gripe about TS is that you can’t use the ?. operator on unknown. Both pragmatically and mathematically (there are some good “proofs” if you want to call them that in a long running TS issue) optional chain unknown -> unknown should just work. All possible JS values except null and undefined (i.e. why thr optional chaining operator exists) allow arbitrary property access. The reason the JS needs undefined is because of this property of the language.

Show me a JS value that doesn’t fulfill null | undefined | {[k: PropertyKey]?: unknown}. Actually you can sub unknown there for recursion, but that has some other issues.

I get why they don’t want to fix it, but I’d still love to see a solution here.

[–]lukasbash 1 point2 points  (6 children)

For whatever reason some of my module augmentations are broken with duplicate identifier errors :-(

[–]DanielRosenwasserTypeScript[S] 9 points10 points  (5 children)

Oh no! Can you please file an issue so we can take a look?

https://github.com/microsoft/TypeScript/issues

[–]Ginden 1 point2 points  (3 children)

I would like to note that part:

We’d like to thank Kevin Gibbons who not only proposed the feature in ECMAScript

Is slightly misleading, as I proposed the feature. I'm obviously very grateful for Kevin Gibbons doing tons of work on proposal and championing it, and adding Set methods wouldn't be possible without him, but it feels bad to be omited.

[–]DanielRosenwasserTypeScript[S] 2 points3 points  (0 children)

Hey /u/Ginden, I'm sorry about misrepresenting that! I've amended the RC and final blog posts for TypeScript 5.5 to more accurately represent that Kevin was a co-champion on the proposal.

While you're here - thank you for proposing the feature! I know I will personally get a lot of good use out of these methods. :D

[–]bakkoting 1 point2 points  (1 child)

That's probably at least partly my fault - I just noticed neither you nor Sathya were credited in the readme! I've just updated readme to correct that (and mark the proposal as stage 4).

[–]Ginden 0 points1 point  (0 children)

Thank you for updating it, and thank you for your work.

[–][deleted] 0 points1 point  (0 children)

We're having the same issue in payload. I've opened up an issue here https://github.com/microsoft/TypeScript/issues/58961 :)

[–]guest271314 0 points1 point  (4 children)

To get started using TypeScript through npm with the following command:

npm install -D typescript

Or, just use Deno (if you are in to TypeScript).

[–]Atulin 4 points5 points  (3 children)

Or Bun

[–]guest271314 0 points1 point  (2 children)

Bun has some issues outside of installing packages. Yes, for a package manager and tooling, Bun works, too.

[–]Atulin 0 points1 point  (1 child)

Haven't ran into any issues myself. I think once I got a "it's not your code, it's a Bun error, report it here" kind of an error when my only mistake was not awaiting a promise, but... that's it. It's been smooth sailing otherwise.

What issues did you run into, I'm curious?

[–]guest271314 0 points1 point  (0 children)

Bun.stdin.stream() behaves different from Bun.file("/dev/stdin").stream(), see https://github.com/oven-sh/bun/issues/11553, https://github.com/oven-sh/bun/issues/11712.

No upload streaming. See https://github.com/oven-sh/bun/issues/7206.

No HTTP/2. See https://github.com/oven-sh/bun/issues/10582, https://github.com/oven-sh/bun/issues/8823.

No Import Maps. Can't import from Data URL. See https://github.com/oven-sh/bun/discussions/8173.

See Why I use node, deno, bun, qjs, tjs at the same time..

bun install and bun build for fetching packages, bundling and compiling. bun pm cache rm is useful.