#typescript
I do wish #TypeScript was stricter about when and where you can use global types. Specifically:
1. Explicit globals: Require `globalThis.foo` to access a global value (not `foo`).
2. Strict dependencies: Require me to _import_ the `declare global` definition from *each* file which references it.
These could help reduce "spooky action at a distance" by forcing devs to be explicit about when and where they are using globals as well as preventing one file from accidentally depending on a global type defined in a completely unrelated file.
Neat #TypeScript trick. You can force a `declare global` from another file into the compilation by using:
```typescript
import type {} from './global.js';
```
If the global isn't otherwise in the compilation, this will pull it in and apply the global types.
But because it's `import type`, the import is elided, so there's no runtime impact.
A little weird to import a `global.js` file which doesn't exist (I put the content in a `global.d.ts` file) but it's useful to manage global usage without having to adjust your `tsconfig.json`.
@nixCraft #Mojolicious for #Perl, because it combines maximum power with maximum whipitupitude: https://mojolicious.org
There is also a #JavaScript (via #TypeScript, natch) flavor: https://mojojs.org
/cc @mojolicious
StreamYard is hiring Staff Software Engineer - Growth
🔧 #typescript #react
🌎 Remote; Portugal
⏰ Full-time
🏢 StreamYard
Job details https://jobsfordevelopers.com/jobs/staff-software-engineer-growth-at-streamyard-oct-23-2023-473384?utm_source=mastodon.world&ref=mastodon.world
#jobalert #jobsearch #hiring
This year I've been really enjoying #AdventOfCode solution blogs by
@geekyaubergine : https://zoeaubert.me/tags/advent-of-code/ : #Rust #Rustlang
@robb : https://rknight.me/blog/tags/adventofcode/ : #PHP
@lewis : https://lewisdale.dev/post/tag/advent-of-code-2023/ : #Typescript
Eric Burden : https://www.ericburden.work/categories/advent-of-code-2023/ : #Kotlin
@neilnjae : https://work.njae.me.uk/tag/advent-of-code/ : #Haskell
Who else is writing great explanations of their solutions? Help me find new people.
(I write #Python solutions at https://hamatti.org/adventofcode/2023)
Waku-Waku excited to share my latest achievement! A React Server Components app built with Waku runs on Cloudflare Workers! Can you guess the challenges I faced?
https://waku-counter.muddy-unit-2d56.workers.dev/
This is my first time using Cloudflare Workers, so please forgive me for any possible misunderstanding.
Note that it doesn't use Node compatibility flag.
I haven't released this new version yet. Stay tuned.
Calling to all Saturday #TypeScript nerds. I wonder why it doesn't do any narrowing here.
```ts
type A = {
tag: 'A',
data: number
}
type B = {
tag: 'B',
data: string
}
type Any = A | B
declare const getAny: () => Any
function getA<Tag extends Any['tag']>(tag: Tag) {
let val: Any & {tag: Tag}
const aVal = getAny();
if (aVal.tag !== tag) throw new Error();
val = aVal;
}
```
Want to try contributing to an #opensource project? vscode-extension-tester is a #TypeScript project that has open issues. Check out this issue on GitHub: https://github.com/redhat-developer/vscode-extension-tester/issues/1021
TIL #deno compile lets you make binaries for all platforms from the same computer. presumably because it's bundling together prebuilt platform-specific binaries with your interpreted code (or v8 snapshots) #javascript #typescript
https://docs.deno.com/runtime/manual/tools/compiler

TypeScript: const type parameterを用いるとas const(constアサーション)が省略できる
https://qiita.com/suin/items/c2a46cf8e6dd7e9c889a?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
#qiita #TypeScript
I had a neat idea on how to make #css currentColor work for external (ie. fetched) #SVG files.
What do you think: https://www.villetakanen.com/sundry/using-lit-and-currentcolor-shadow-trick-for-svg-icons
Тесты производительности фреймворка Cample.js. Отчёт № 0
В данной статье содержатся тесты фреймворка Cample.js бета-версии 3.2.0-beta.6 . Это нулевой отчёт о тестах. По мере изменения результатов фреймворка, возможно, смогут выйти ещё несколько отчётов. Отчёт включает в себя сравнения по скорости с популярными фреймворками и библиотекой, а также сравнение с реализацией на чистом javascript.
https://habr.com/ru/articles/779240/
#cample #camplejs #javascript #benchmark #benchmarks #testing #typescript
Visual Studio Code November 2023 Release (version 1.85).
#vscode #programming #javascript #typescript #copilot #githubcopilot #git #productivity
https://code.visualstudio.com/updates/v1_85
Large Scale Apps with React and TypeScript by Damiano Fusco is on sale on Leanpub! Its suggested price is $29.99; get it for $22.49 with this coupon: https://leanpub.com/sh/bjIuoMaO #ComputerProgramming #React #Javascript #WebDevelopment #SoftwareArchitecture #Typescript #Vuejs
https://lucumr.pocoo.org/2023/12/1/the-python-that-was/
Unpopular, but I share all of this. While I cannot deny the power I see in #TypeScript, duck typing on Python is a totally different matter. I don't see much value in it (except if you are on libs like Pydantic or Fastapi, but this is a different application of types).
I was a Java Guy in 2003/2004, I knew everything about the language, a real typing fan-boy.
When I switched to #Python... Wow. I was impressed by the gain in productivity and how much the code was clear.
In today's very first Satounki live coding video we dive into:
* Refactoring declarative macros in #Rust
* Discussion about ergonomic API client design in #Golang and #Typescript
* Generating Golang and Typescript API clients (not just typedefs!) from #Rust
Обкатка альфа-теста и обновления на Капибаре
Сегодня у нас вышел второй официальный пост о прогрессе в разработке уже на самом сайте Продолжу рассказывать о развитии Капибары, опенсорсном проекте , цели которого воспроизвести лучшее что было на пикабу и не наступить на их же "грабли". Первая часть здесь: https://habr.com/ru/articles/759598/ . Вторая часть здесь: https://habr.com/ru/articles/773234/ 🌟 Сегодня у нас в арсенале кое-что интересное. 🌟 Новый редактор
https://habr.com/ru/articles/779408/
#разработка #разработка_приложений #python #vue #typescript #opensource
[JsonHilo.js](https://github.com/xtao-org/jsonhilo) is participating in a [Githelp](https://githelp.app/repos/jsonhilo) trial.
At the moment this is a limited opportunity to try an early version of Githelp where you can get help and support, including direct online assistance, related to JsonHilo.js [here](https://githelp.app/repos/jsonhilo).
#jsonhilo #help #support #githelp #trial #json #parser #minimal #fast #lossless #event #streaming #sax #javascript #deno #typescript #bun #node #nodejs
I'm taking part in #AdventOfCode this year and wanted an easy way to share my solutions and progress, so I did that thing that I do and built a tiny website.
https://advent-of-code.farrant.me/2023/days
Hopefully working in public will motivate me to get a bit further this year than I have done in previous years.
Solutions are written in #typescript — lmk your feedback!
I'm using #TypeScript type checking with #JSDoc in client-side #JavaScript and I encountered this problem:
> Property 'innerText' does not exist on type 'Element'
It took a bit of searching, but I've learned that the solution for me is:
```javascript
/** @type {NodeListOf<HTMLElement>} */
```
I don't like how this is documented. It's on a page about DOM manipulation with TypeScript, which makes some sense, but I didn't see anything about doing this in JS with JSDoc. It says it's defined in lib.dom.d.ts and I thought I might have to import a type definition somehow.
I found it here:
https://www.typescriptlang.org/docs/handbook/dom-manipulation.html#the-queryselector-and-queryselectorall-methods

Frontend Talks: усиливаем TypeScript с помощью switch + notReachable
Привет, Хабр! Я Илья Белявский — старший Frontend-разработчик Читать дальше
Scaleway is hiring Engineering Manager Account and Console Experience
🔧 #golang #javascript #python #typescript #grpc #rest #ansible #docker #postgresql #sql #engineeringmanager
🌎 Paris, France
⏰ Full-time
🏢 Scaleway
Job details https://jobsfordevelopers.com/jobs/engineering-manager-account-and-console-experience-at-scaleway-sep-11-2023-1e430a?utm_source=mastodon.world&ref=mastodon.world
#jobalert #jobsearch #hiring
Problem: I have a set of multi-step form wizards. I want a type that is a union of all the step URLs. The config object looks something like:
const journeys = {
'/some_journey': ['/first_step', '/second_step', '/finish'],
'/another_journey': ['/landing_page', '/success'],
}
Answer in next post #typescript
As always, solutions can be found in my repo. I do plan on going back later and updating part 1 to work with part 2, and move some of the things into a common file.
#AdventOfCode #AdventOfCode2023 #TypeScript
https://git.vzqk50.com/ApisNecros/AdventOfCode-ts-2023/src/main/6
Heute erst in den Abendstunden dazu gekommen. Wirklich smart war mein Wechsel von Stern 1 zu Stern 2 nicht, aber eine bessere Lösung habe ich nicht. Meine Änderungen: Sowohl Kartenreihenfolge als auch die Prüffunktionen für die Handtypen kopiert und angepasst.
Dann parser und comparer parametrisiert.
I've completed "Camel Cards" - Day 7 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/7
For realsies tho, if anyone would like to take a look at my solution (specifically part 2) and let me know why it takes so long, and how I might optimize it, I'd appreciate it a lot.
#AdventOfCode2023 #AdventOfCode #TypeScript
https://git.vzqk50.com/ApisNecros/AdventOfCode-ts-2023/src/main/5/5_2.ts
Holy moly I'm glad that's over with. I tried to take a "readability over optimization" approach, but when I got to the actual input, it was too much and JS ran out of memory. My updated solution did work for both parts, but for some reason part ii takes nearly 5 minutes to find the answer 💀
Whatever. Onto day 6!
I just completed "If You Give A Seed A Fertilizer" - Day 5 - Advent of Code 2023 #AdventOfCode #TypeScript https://adventofcode.com/2023/day/5
Datadog is hiring Senior Software Engineer (Frontend) - Security Platform
🔧 #javascript #typescript #react #redux #css #html #securityengineer #seniorengineer
🌎 Madrid, Spain
⏰ Full-time
🏢 Datadog
Job details https://jobsfordevelopers.com/jobs/senior-software-engineer-frontend-security-platform-at-datadoghq-com-oct-18-2023-11250c?utm_source=mastodon.world&ref=mastodon.world
#jobalert #jobsearch #hiring
#AdventOfCode Day 6
As easy as Day 5. Solved in #TypeScript, with a small plot showing the example races in #PICO8
Code: https://git.scambier.xyz/scambier/adventofcode2023/src/branch/master/day6-ts/day6.ts
Animation: https://www.pico-8-edu.com/?c=AHB4YQPPAfHH33-10c3oEzTR4W9QHVW8xUgSJMVBZyQnFa-ReOmai5LoonvcelERRRc1dojLIniEjQd4hGd4goNuCS6y8tTYlj-6iYW7TB8rDLzAO-RhP9BG5RvsZQ-wBuFiNCI5MlU2I4oDO2nTN3VmqfPnHqA5zhbFbUU505YL0uGJVEp6wZDZiSqL4oU0mVoyyahTt8z-WMxYekXdmvrIWjsWR3Ecuus_8_igPUUUvYUZBge3JJGijTrJR4IBr8zNVUOpN6RCHyLRS1iN8shGAzZ7hi1TrXpLLEyqZEuqqNvTWVpsFqMbC0vN_f6MBmSG5ArLmVqqZEp5YTAYNsGy-ddvDQ4FxY5CaB0qhEMlyWqCJq1eydyAyKqYofKpJkswLs-uRoosCXa8USUnigjMJr0npzwjayQepGlgzG7RcXeKpKxsD2z6svRL7j3BpFw_LR22n9yL0wSexFgGqikJ0qguN0c23RoNqKwM6JaN9pn0kiCL3oiZBA8W4xlR8UyJj-rJt6pwag5HBs3u2UExoeXS6bMs_GRaH1I_dnZJKOx4obA1OQylcGizZsEtYnN6j_HkcqJVEdlxdzJpI5UngRuPrMnwjW9PLJqgmR3cmkj29K60M6rB2UZCX-Pza3tpqoRX5voP2XScVtW2XA4=&g=w-w-w-w1HQHw-w2Xw-w3Xw-w2HQH

Btw…
The more advanced solution would be to define my own MouseEvent type, and with the help of eslint, I would force other devs to use the ‘better’ MouseEvent type.
Why is `MouseEvent.target` an `EventTarget` and not a `HTMLElement`?
Why cant i do
```
onClick(event : MouseEvent) {
console.log(event.target.textContent)
}
```
It gives the error: `Property 'textContent' does not exist on type 'EventTarget'.ts(2339)`
»Diese 7 Programmiersprachen sind 2024 besonders gefragt«
Ich erstelle #Web-Funktionen durch das Programmieren mit #Python und #TypeScript und lerne für meine pers. so wie #Job-Erweiterung nun selbständig @rust. Laut diesem Artikel ist dies nicht schlecht für meine Moderne ;)
🧑💻 https://t3n.de/news/7-programmiersprachen-2024-gefragt-1594867/
Day 06 ⭐️⭐️
Easy but brut force on part-2
https://github.com/willybrauner/advent-of-code/blob/main/2023/day-06/index.ts
oh how curious, got a little snag in my data parsing that caught me off guard ( 🤦♂️ ) , but i got #adventofcode day02, part02 in at a reasonable time on a weeknight!
https://github.com/drincruz/advent-of-code/pull/45/files #typescript
#WebDev #PlainJS Ask
Anyone know how to bundle #typescript type declarations?
I want to bundle those *.d.ts files because I'm `vendor/`ing my dependencies.
Oh look at that, my documented #TypeScript solutions are in my repo!
#AdventOfCode #AdventOfCode2023
https://git.vzqk50.com/ApisNecros/AdventOfCode-ts-2023/src/main/4
@kaiserkiwi Some people honestly enjoy pain.
I use #TypeScript at work 😬
Someone at work tries to push a switch to #TypeScript.
We have some problems with code quality currently but TypeScript definitely won't solve any of that. It would just introduce more problems.
It's funny that he now comes with the "shiny new thing!!!" as the whole web is deciding to completely drop TypeScript in favor of JSDoc and simple native #JavaScript.
I always dodged TypeScript and every time I had to work with it, it was just a terrible experience. I don't get why people always try to abstract stuff to learn something different instead of just learning the thing they already use correctly.
As always, my fully documented solutions can be found in my repo.
#TypeScript #AdventOfCode #AdventOfCode2023
https://git.vzqk50.com/ApisNecros/AdventOfCode-ts-2023/src/main/3
HOOO BOY! The only thing I hate more than trying to find if two things on a 2D grid are touching is finding if two things on a 2D grid are touching where at least one of those things takes up more than one cell.
I didn't even try to take an optimized approach to this. It's legible. That's all I care about this time.
I just completed "Gear Ratios" - Day 3 - Advent of Code 2023 #AdventOfCode #TypeScript https://adventofcode.com/2023/day/3
🎄 Morgen, 07.12., 09.00 #heise_academy:
"Dynamische Typen mit #TypeScript entwickeln - Grundlagen" (und anderes...)
https://app.heise-academy.de/events/dynamische-typen-mit-typescript-entwickeln-grundlagen-cea6d1

#TypeScript seems to divide opinion, but this bug I just ran into on the Boots website when trying to book a vaccination is a great example of exactly the sort of issue TS is great at catching and preventing.
"Appointments last approximately undefined minutes."

Last night I moved my #Chrome #extension from #manifestv2 to #manifestv3, overall the docs were pretty good and it went better than I expected but there were some gotchas with the `activeTab` permissions. I also switched to #webpack for #TypeScript compilation.
Here's my PR for the curious: https://github.com/StephenFluin/angular-inspector/commit/4a1243621cb6574fe5c6a8fb61e976286f3cf3fd#diff-474e648025143539d50a25990e184704979011829c74eabd70592fa7a7bae6a6R3
Show HN: TSDiagram – Diagrams as Code with TypeScript
Discussions: https://discu.eu/q/https://tsdiagram.com
Analysis: check!
Aufwand für zweiten Stern minimal. :D
I just completed "Wait For It" - Day 6 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/6
Learn how to extend Copilot for Microsoft 365 with these five sample plugins all built using Teams Toolkit for Visual Studio Code and Visual Studio.

Clap your hands if you’ve been awake since 2AM, doomscrolling the usual depressing news and job ads websites, unable to sleep 🙌
#fedihire #Rust #Rustlang #NodeJS #JavaScript #TypeScript #freelance
#AdventOfCode Day 5
This one was easier to solve than to read, surprisingly. I solved both parts first try (yay!), and part 2 took 3-4 minutes to run with minimal ram usage.
Instead of building huge maps of billions of records (why?!), I just wrote a small function that takes a source value, a map in the form of [dest source range] (literally as written in the input), and it calculates the destination value.
https://git.scambier.xyz/scambier/adventofcode2023/src/branch/master/day5/main.ts

![/**
* Given a source input and a sorted list of maps, calculate the destination value
* @param input
* @param maps in the form of [[dest, sourceFrom, sourceTo]]
* @returns
*/
function getMapResult(input: number, maps: number[][]): number {
// Get the map corresponding to number
let mapped = -1;
for (const map of maps) {
const sourceFrom = map[1];
const sourceTo = map[1] + map[2] - 1;
if (input >= sourceFrom && input <= sourceTo) {
mapped = map[0] + input - sourceFrom;
}
}
if (mapped > -1) return mapped;
return input;
}](https://assets.toot.cafe/cache/media_attachments/files/111/547/285/100/137/936/small/a38b6b9ba8b142c0.png)
👋🏻 Over the next couple of months at Nordhealth we're going to be hiring for several Senior Frontend Developer positions to help us build out an entirely new architecture for one of our flagship products.
Utilising tools such as Nuxt, Web Components, TypeScript and REST APIs. You'll also be working on our legacy products which utilise Web Components as well. Please do get in touch if you're interested. More details can be found here:
https://careers.nordhealth.com/jobs/3328807-senior-frontend-developer
Webinarserie zu TypeScript: Letzter Aufruf zum Deep Dive in das Typsystem
Bereits in zwei Tagen startet die Webinarserie zum Entwickeln dynamischer Typen in TypeScript. Kurzentschlossene können sich noch dafür anmelden.
just finished.
Very nice piece!
very small correction;
Peertube is finest #TypeScript (which is “pure JS” for the end user :) - the framework is angular.
What I am currently interested in, is metrics to calc how many requests and traffic (and maybe space) larger instances need.
And also in the deduplication of (public) content.
PS Save the 2024 date ;)
https://fedi.camp
Waku is under active development. Just noticed the source code is larger than Jotai.

How much function overloading is too much for one function?
As an upcoming project for December/January got cancelled, I am now available for #freelance work.
I do #FullStack web development, fluent in #HTML, #CSS, #JavaScript, #TypeScript, #Java, #Python, #Ruby, and #Scala. Can also do #DevOps and #ProjectManagement.
Dream projects: maps / GIS, sports, health, fighting climate change, public transport, finance, audio. (But interested in anything else except crypto.)
More about me here: https://salomvary.com/
Use Angular’s New Deferrable Views Now.
#angular #javascript #webdev #typescript
https://blog.angular.io/use-angulars-new-deferrable-views-now-20ca9f64f1e5
Web Development recap for week 48/2023
https://discu.eu/weekly/webdev/2023/48/
#css #javascript #nodejs #programming #typescript #webassembly #webdev
Get RSS feeds and support this bot with the premium plan: https://discu.eu/premium
For anyone following along, the issue is a known problem in #typescript and is discussed here: https://github.com/microsoft/TypeScript/issues/32452
The workaround is to override the type of `constructor` using a typescript `interface` of the same name as the class. A bit crappy.
Trying to write a #typescript type guard that correctly types constructor as the class the object is created from to allow typed access to static members from an instance via obj.constructor.
Here's some broken typescript that is close to what I want to do…
We have a new discussion to improve valtio-yjs. If you are interested, please jump in. We need contributors! https://github.com/valtiojs/valtio-yjs/issues/45
Jotai atoms are distinguished by references. Do you think this is unique in React? It's similar to React Context. While React Context must be defined statically, Jotai atoms can be dynamic because Jotai's store is based on WeakMaps.
Amazing. Someone made a #typescript to #lua transpiler. 😎
Just released valtio-yjs v0.5.1!
It's one of popular projects in Valtio Labs.
If you know what is Valtio and what is Yjs, you can guess what it does. 😁
@randomgeek #TypeScript is just tarted-up #JavaScript for #CompSci nerds and aspirers 🤓
During the past 6 months I invoiced a grand total of 11 days so at this point I will code for food, I guess 🫠
I have 15 years of experience from developer to CTO, out of 10 as freelancer, and 2023 will be my worst year ever. Living that while inflation explodes is probably not helping either 🥴
#rust #RustLang #fedihire #freelance #contractor #nodejs #typescript
Ok, here we go, ready for #AdventOfCode with #CPP characteristics... https://github.com/mattjbones/advent-of-code/blob/main/2023-cpp/src/main.cpp
Also displaying my incomplete #Rust attempt from last year and even the #TypeScript escape hatch
🎉 New episode of JS Party!
Amal, @nicknisi & special guest @laura geek out over the remarkable growth and evolution of the #XState project and its team in recent years 🥳
Laura also tells everyone about Stately, a SaaS platform that uses AI to create seamless state management solutions compatible with various tools like XState, #Redux & #zustand 💽
A nice #typescript starter project for #AdventOfCode https://www.youtube.com/watch?v=cOHIO5UXqMw
Over the last few months I've been using #TypeScript w/#SvelteKit to build web/mobile and... I freakin' love it.
I first took a look at TypeScript years ago, when it was pretty awful and there were no libraries that included types. Nowadays practically everything ships with types and it's great.
For someone who's been very, very Java & .NET centric for a long, long, long time... pretty interesting times.
Say I want to add fuzz testing to a #JavaScript/ #TypeScript hybrid project, what fuzz lib/tool/framework would I want to use? 🫶
Please only recommend or discourage specific projects only if you have personal experience with them, I can use search engines. 🤘
Hey! I’m a senior front-end developer looking for my next medium- to long-term freelance role.
I have 14 years of experience working along the full web development stack, usually with #JavaScript, #TypeScript, #ReactJS, #NextJS and #TailwindCSS. I often work with e-commerce and healthcare clients. Once, I helped turn a household appliance into a smart IoT prototype.
Go to https://domhabersack.com/cv for my CV or https://domhabersack.com/meeting to set up a meeting.
One of the best SIMD intro articles I've ever come across thus far. Very nicely explains all the core concepts and operations, lots of sketches/diagrams... Noice! 👏
https://mcyoung.xyz/2023/11/27/simd-base64/
Btw. If you're using TypeScript/JavaScript, you can play with some of these concepts/ops directly from the REPL using https://thi.ng/simd. This package uses WASM behind the scenes, but doesn't expose the full set of available SIMD instructions (it's a lil' bit more highlevel...)
Also see recent #HowToThing post and practical example about it here:
https://mastodon.thi.ng/@toxi/111283262419126958
I stayed up too late writing about how to get Svelte 5 pre-release alpha running so you can start building with Svelte Runes locally and discovered midway through a heaps easier way to do it. Aaaaaanyway here's how if you're interested. https://josh.is-cool.dev/running-runes-locally-with-svelte-5-pre-release-alpha/
I must admit I did not realize Deno comes with a built-in testing environment. As the article says, there are probably more sophisticated testing environment out there, but this one is simply “here”, built in the (Deno) system…
The pointer below is the first in a series…
https://medium.com/deno-the-complete-reference/testing-with-deno-part-1-basics-375aa90c5cb5
Leveling Up our APIs with TypeScript
https://cord.com/blog/leveling-up-apis-with-typescript
Discussions: https://discu.eu/q/https://cord.com/blog/leveling-up-apis-with-typescript
We have a job opening in our team which is part of the Azure Core Linux group at Microsoft.
It's a small remote team with folks distributed around the world(Berlin, USA, India, Portugal). We do #opensource in a #UX / #design friendly kinda way.
Location: Poland, Czechia, and Romania (other locations would be very complicated/unlikely).
https://jobs.careers.microsoft.com/global/en/job/1596289/Senior-Software-Engineer-(IC4)
#kubernetes #linux #TypeScript #golang #react #mui
Thanks to the PHP community, here are programming languages that have an official and verified Mastodon account:
✅ Python – @ThePSF
✅ Rust – @rust
✅ TypeScript – @TypeScript
✅ PHP – @php, @thephpf
Web Development recap for week 47/2023
https://discu.eu/weekly/webdev/2023/47/
#css #javascript #nodejs #programming #typescript #webassembly #webdev
Get RSS feeds and support this bot with the premium plan: https://discu.eu/premium
I <3 #TypeScript / #JavaScript code migration tools. Major advantage over other systems.
1) Want to change an API for a library? Write 'code mods' to refactor code for folks.
2) Babel and TypeScript allow using newer standards right away because the compiler outputs compatible code! Use all the new features now! Having written a lot of portable code in #C / #Python this is A-MAZIN. Library authors can use the latest lang features. C89 anyone?
Justifying why types shouldn't lie
https://github.com/knex/knex/issues/387
Discussions: https://discu.eu/q/https://github.com/knex/knex/issues/387
I'm trying to copy this module, and make a small astro npm module. But I'm realizing that there's no type safety for modules created this way. There's also no way to build a d.ts file because of the astro import. Does anyone have a way to generate types for a astro module?
https://github.com/delucis/astro-embed/tree/main/packages/astro-embed-twitter
Also posted on the Astro discord:
https://discord.com/channels/830184174198718474/1177710409080385546/1177710409080385546
cc @astro
As explained by @JoshuaKGoldberg, TypeScript doesn’t use semantic versioning (semver): “A new major version of TypeScript (e.g. 5.0.0) is released if the minor version would have exceeded 9 (e.g. 4.10.0).”
https://www.learningtypescript.com/articles/why-typescript-doesnt-follow-strict-semantic-versioning
It’s interesting that people don’t seem to be aware of that and hesitate to upgrade to a different major version (peaks at 2.9, 3.9, 4.9): https://majors.nullvoxpopuli.com/q?minors=on&packages=typescript