https://gist.github.com/mgol/af95c1358d4ca9f2d45db4f0c55a74a...
jQuery Core: Migrate from AMD to ES modules
11–18 of 18 posts
Re: jQuery Core: Migrate from AMD to ES modules
#12Does anyone know if there is any effort to move jQuery development towards using TypeScript or something similar? For some reason I had assumed they probably already were.
Some of jQuery APIs wouldn't be that easy to convert to TS internally, we'd have to have lots of casting and most likely file size would suffer and that's one thing we care a lot about in the jQuery team. Plus, that would be a barrier for some contributors. The @types/jquery package is maintained quite well so TS users can consume a typed jQuery anyway. So, no plans to switch to TypeScript (or to ES6+ with the except…
In short, I strongly doubt that the need for type assertions would meaningfully impact jQuery file size.
Re: jQuery Core: Migrate from AMD to ES modules
#13Earlier quoted context omitted.
That's fine, I'll take that my point stands still though.
People bashing on jquery for that "points" never understood why jquery is even here to stay for at least 2 more years.
So I made a simple TODO in like 30min. Naturally part of this is my familiarity with jQuery, the other is, for a small application jQuery is really great. I had a nice UI in no time.
Re: jQuery Core: Migrate from AMD to ES modules
#14Does anyone know if there is any effort to move jQuery development towards using TypeScript or something similar? For some reason I had assumed they probably already were.
Some of jQuery APIs wouldn't be that easy to convert to TS internally, we'd have to have lots of casting and most likely file size would suffer and that's one thing we care a lot about in the jQuery team. Plus, that would be a barrier for some contributors. The @types/jquery package is maintained quite well so TS users can consume a typed jQuery anyway. So, no plans to switch to TypeScript (or to ES6+ with the except…
A good point considering the scope of jQuery and its user base. I don't know much about generating larger file sizes but the community contribution aspect isn't something I considered.
Re: jQuery Core: Migrate from AMD to ES modules
#15Earlier quoted context omitted.
Some of jQuery APIs wouldn't be that easy to convert to TS internally, we'd have to have lots of casting and most likely file size would suffer and that's one thing we care a lot about in the jQuery team. Plus, that would be a barrier for some contributors. The @types/jquery package is maintained quite well so TS users can consume a typed jQuery anyway. So, no plans to switch to TypeScript (or to ES6+ with the except…
Not to take anything away from your larger point, but TypeScript doesn't have not casting, it has type assertions. This matters because casting means "turn it into this type", which generates code. A type assertions only means "assume it's this type". It gets removed at compile time, plus any intermediate variables you might need to create to avoid the occasional type assertion monstrosity will be appropriately clean…
I haven't done any real testing on the jQuery code base but that's my experience working on some TypeScript projects.
Re: jQuery Core: Migrate from AMD to ES modules
#16Earlier quoted context omitted.
Some of jQuery APIs wouldn't be that easy to convert to TS internally, we'd have to have lots of casting and most likely file size would suffer and that's one thing we care a lot about in the jQuery team. Plus, that would be a barrier for some contributors. The @types/jquery package is maintained quite well so TS users can consume a typed jQuery anyway. So, no plans to switch to TypeScript (or to ES6+ with the except…
Not to take anything away from your larger point, but TypeScript doesn't have not casting, it has type assertions. This matters because casting means "turn it into this type", which generates code. A type assertions only means "assume it's this type". It gets removed at compile time, plus any intermediate variables you might need to create to avoid the occasional type assertion monstrosity will be appropriately clean…
Re: jQuery Core: Migrate from AMD to ES modules
#17Earlier quoted context omitted.
That's fine, I'll take that my point stands still though.
People bashing on jquery for that "points" never understood why jquery is even here to stay for at least 2 more years.
Re: jQuery Core: Migrate from AMD to ES modules
#18Earlier quoted context omitted.
People bashing on jquery for that "points" never understood why jquery is even here to stay for at least 2 more years.
I do understand it and I’m sure it will stay. I just think it’s not a good practise to use it anymore.