2ality – JavaScript and more
TypeScript enums: use cases and alternatives
TypeScript enums: use cases and alternatives
2Ality
TypeScript enums: use cases and alternatives
In this blog post, we take a closer look at TypeScript enums: How do they work? What are their use cases? What are the alternatives if we don’t want to use them? The blog post concludes with recommendations for what to use when.
🤬1
2ality – JavaScript and more
ECMAScript proposal: RegExp escaping
ECMAScript proposal: RegExp escaping
2Ality
ECMAScript 2025 feature: RegExp escaping
The ECMAScript proposal “RegExp escaping” (by Jordan Harband and Kevin Gibbons) specifies a function RegExp.escape() that, given a string text, creates an escaped version that matches text – if interpreted as a regular expression. This proposal reached stage…
🤬1
2ality – JavaScript and more
Template literal types in TypeScript: parsing during type checking and more
Template literal types in TypeScript: parsing during type checking and more
2Ality
Template literal types in TypeScript: parsing during type checking and more
In this blog post, we take a closer look at template literal types in TypeScript: While their syntax is similar to JavaScript’s template literals, they operate at the type level. Their use cases include: Static syntax checking for string literals Transforming…
🤬1
2ality – JavaScript and more
Computing with tuples in TypeScript
Computing with tuples in TypeScript
2Ality
Computing with tuple types in TypeScript
JavaScript’s Arrays are so flexible that TypeScript provides two different kinds of types for handling them: Array types for arbitrary-length sequences of values that all have the same type – e.g.: Array<string> Tuple types for fixed-length sequences of values…
🤬1
TypeScript
Announcing TypeScript 5.8 Beta
Announcing TypeScript 5.8 Beta
Microsoft News
Announcing TypeScript 5.8 Beta
Today we are excited to announce the availability of TypeScript 5.8 Beta. To get started using the beta, you can get it through npm with the following command: npm install -D typescript@beta Let’s take a look at what’s new in TypeScript 5.8! Checked Returns…
🤩2🤬1
2ality – JavaScript and more
Tutorial: publishing ESM-based npm packages with TypeScript
Tutorial: publishing ESM-based npm packages with TypeScript
2Ality
Tutorial: publishing ESM-based npm packages with TypeScript
During the last two years, ESM support in TypeScript, Node.js and browsers has made a lot of progress. In this blog post, I explain my modern setup that is relatively simple – compared to what we had to do in the past:
👍1🤬1
螺莉莉数据中心
教育的下一步
教育的下一步
螺莉莉的数据中心
教育的下一步 | 螺莉莉的数据中心
随着 Deepseek R1 模型的出现,之前我对大语言模型的诸多论断全都被推翻了。比如先前我在「当患有 ADHD 的工程师坐上了名为人工智能的四驱赛博轮椅」这篇文章提到的开发范式,已经出现了大幅的松动。
原本我在向大语言模型提出开发需求时还需要剪裁自己手里的代码,把问题的核心全都一一挖出来陈列好,交给模型处理。可是现在只需要把所有跟业务逻辑有关的几页代码全都粘在一起,模型就能自己参考有关的实现,完成必要的开发工作。在使用 Rust 这类相对复杂的语言时,模型也能做到基本不出错,出错只需要简单修正一两次,就可以产出高度可用的成果。…
原本我在向大语言模型提出开发需求时还需要剪裁自己手里的代码,把问题的核心全都一一挖出来陈列好,交给模型处理。可是现在只需要把所有跟业务逻辑有关的几页代码全都粘在一起,模型就能自己参考有关的实现,完成必要的开发工作。在使用 Rust 这类相对复杂的语言时,模型也能做到基本不出错,出错只需要简单修正一两次,就可以产出高度可用的成果。…
👍2🤬1