Live data from Hacker News

TS to JSDoc Conversion

github.com

41–50 of 163 posts

Re: TS to JSDoc Conversion

#42
post #28

Earlier quoted context omitted.

where does it say that JSDoc has runtime implications?

It doesn’t and I say in my comment that it is not the same thing. Nevertheless it gives me the same uneasy feeling because you don’t know what features are going to creep into the language further down the road.

It seems extremley unlikely that Javascript would ever make comments affect the runtime of the language. I'm not sure why there's a fear here why browser vendors/es standards comittees would opt to go down this road?

Re: TS to JSDoc Conversion

#43
post #8
post #5

Earlier quoted context omitted.

ts-node [1]: am i a joke to you? [1] https://www.npmjs.com/package/ts-node

I’ve generally found tsx to be better/less hassle than ts-node https://github.com/esbuild-kit/tsx

Oh very cool, I'll have to look into this because ts-node can be a pain sometimes. Unfortunate name collision with the TS equivalent of JSX though.

Re: TS to JSDoc Conversion

#44
post #28

Earlier quoted context omitted.

where does it say that JSDoc has runtime implications?

It doesn’t and I say in my comment that it is not the same thing. Nevertheless it gives me the same uneasy feeling because you don’t know what features are going to creep into the language further down the road.

You’re literally not making any sense.

JSDoc is like 20 years old and not part of the javascript langage, it’s just a way of formatting some comments such that they’re programmatically process able.

Re: TS to JSDoc Conversion

#45
The developers providing everyone with free tools are or course welcome to write those tools in whatever languages they want. But to me, the comment definitions are longer to type and more difficult to parse than inline type definitions. I would much rather use one of the quick TS compilers that don't actually type check when I want to make and test a small change to my source code. But to each their own!

Re: TS to JSDoc Conversion

#46

I love pure JS over TS any day, but isn't this using JSDoc in a way it's not meant to be used? Why would you use JSDoc as a JS type framework? Or is the post title a bit misleading...?

Because this way you get amazing IDE support with code navigation, refactoring, and (with strict mode) warnings about likely bugs and missing null checks.

Re: TS to JSDoc Conversion

#47

I love pure JS over TS any day, but isn't this using JSDoc in a way it's not meant to be used? Why would you use JSDoc as a JS type framework? Or is the post title a bit misleading...?

this is exactly what JSDoc is for, it's had these capabilities from the start.

Re: TS to JSDoc Conversion

#49
post #35
post #19

If I remember right, symfony (php framework) has comments that affect how the code runs which as far as I’m concerned means they’re not comments at all but actually code masquerading as comments. Reading about JSDoc gives me the same uneasy feeling, even if it’s not quite the same thing. Edit: Here’s one example, you can define your routes in symfony using comments. Not only that, but it’s actually the officially rec…

I don't see any comments there, I see attributes though [1]. Is that what you meant? From the page you linked: > Routes can be configured in YAML, XML, PHP or using attributes. All formats provide the same features and performance, so choose your favorite. Symfony recommends attributes because it's convenient to put the route and controller in the same place. Attributes are not comments, they are an official structur…

I’m sorry, but if it’s using the same starting symbol as a comment, and it’s greyed out in the text editor like a comment, then you can call it whatever you want, but it is a fucking comment. There are a bunch of unused symbol combinations on the keyboard that could have been used, there is absolutely no excuse for it.

Re: TS to JSDoc Conversion

#50
post #14

It always makes me chuckle when a bunch of non-contributors come out of the woodwork to provide their opinion on a change which will affect them not at all.

Funnily enough it's always stuff that's bikesheddding.

I spend months trying to solicit feedback on new experimental stremaing/cancellation APIs in Node and it's silence for a year until people start using it.

We say that contributors agreed to list pronouns in the readme or we mention inclusivity and oh-boy do a lot of random people from the internet cares about how the volunteers that write the software they use for free refer to each other internally.

Post reply on HN