You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
皆さんこんにちは。先日、Biome v2がリリースされ話題となりました。Biome v2の新機能の一つに型推論があります。 TypeScriptコードに対するlintにおいて型情報を使う (type-aware linting) 機能は、これまでのところTypeScript-ESLintによって提供されてきました。これは、実際のTypeScriptコンパイラを使って型情報を取得するので、重いという欠点がありました。TypeScript自体もGoへの移植などを通じてパフォーマンス改善に取り組んでいますが、Biomeはこの問題に対して別のアプローチをとっていました。それが、本家TypeScriptコンパイラに頼らず独自に型推論を行うというものです。 ただし、TypeScriptコンパイラは非常に複雑なシステムであり、別実装でその型推論結果を完全に再現するのはまず不可能です。そのため、Biome
ESLint コアルールの TypeScript 対応について ESLint v9.23.0 で ESLint のコアルールの TypeScript 対応が開始しました。 その後の ESLint のアップデートでもコアルールの TS 対応が進んでいます。ESLint コアの責務を増やすような機能追加は少し意外だと感じたので、その背景について調べてみました。 背景: 従来のコアルールの拡張方法の課題 ESLint のコアルールは JavaScript を想定して書かれたものであるが、TypeScript に対してもほぼ期待通り動作するルールが多い。TypeScript は JS のほぼ上位互換な言語であるため、TypeScript 用のパーサー (@typescript-eslint/parser) が吐き出す AST もほぼ上位互換であり、パーサーさえ TS 用のものを使えば多くの ESL
While we’re not yet feature-complete, these numbers are representative of the order of magnitude performance improvement you’ll see checking most codebases. We’re incredibly excited about the opportunities that this massive speed boost creates. Features that once seemed out of reach are now within grasp. This native port will be able to provide instant, comprehensive error listings across an entir
TL;DR: JavaScriptで使われるネイティブパーサーは、言語間の余分な作業のために常に速いとは限りません。これらのオーバーヘッドを回避し、マルチコアを使うことが性能にとって重要です。 Rustは、そのパフォーマンスと安全性の特徴から、JavaScriptエコシステムの中で急速に選択肢の一つになっています。しかし、RustをJavaScriptツールに統合することは、特に効率的で移植性の高いプラグインシステムを設計する際に、固有の課題をもたらします。 「JavaScriptツールをRustで書き直すことは、広範な外部貢献を必要としない速度重視のプロジェクトにとって有利です。」 ESLintの作者であるNicholas C. Zakas Rustは、その急な学習曲線のために難しいものになりがちで、さらにコンパイルされたバイナリを異なるプラットフォームに配布することも簡単ではありません
By: Michael Mitchell, Patrick Hayes We previously wrote about how Airtable migrated its codebase from Flow to TypeScript. A few years and several TypeScript versions later, TypeScript is still a critical tool for preventing bugs early on in the development cycle. Back when the previous article was written, we had just over 50 TypeScript projects — mostly mirroring the top-level directory structure
Four years ago, while doing a code review at work, I was surprised that Flow had not warned about an unnecessary null check. Last month, TypeScript 5.6 released with validation rules that disallows useless nullish and truthy checks which uncovered nearly 100 existing bugs in the top 800 TypeScript repos on GitHub. The two events are connected because that moment in code review four years ago led m
TypeScript 5.7で追加される --rewriteRelativeImportExtensions オプションは、その使用にあたって注意が必要なオプションです。 背景としては、このオプションに関して最近英語圏のTSエヴァンジェリストのような人が積極的な活用を推奨する投稿をしました。一方で、TypeScriptチームはこのオプションを使うのは限定的な場合に限るべきとしています。 この記事ではTypeScriptチームの側に寄り添い、--rewriteRelativeImportExtensions オプションをむやみに使うべきではない理由について解説します。 以下に引用するのはTypeScriptチームのRyan氏の投稿のひとつです。 If you can't coherently explain why this flag wasn't present for the previ
Today we are excited to announce the availability of the release candidate of TypeScript 5.6. To get started using the RC, you can get it through npm with the following command: npm install -D typescript@rc Here’s a quick list of what’s new in TypeScript 5.6! Disallowed Nullish and Truthy Checks Iterator Helper Methods Strict Builtin Iterator Checks (and --strictBuiltinIteratorReturn) Support for
こんにちは teppeis です。普段は開発本部長をやってますが、ブログフェスに駆り出されました! 本日は Node v22.3.0 に続いて v20.16.0 にもバックポートされた process.getBuiltinModule(id) について解説します。 問題: 同期的な条件付き require を ESM 化できない Node v22 にて、フラグ付きで CJS (CommonJS Modules) から ESM を require できるようになりました。いわゆる require(esm) です。これにより、今までは互換性の懸念で ESM 化を足踏みしていた著名ライブラリも ESM 化を試みる動きが出てきました。 TypeScript もその一つで、TypeScript チームは TypeScript 自体を ESM 化しようと試みました。しかしながら、今回の主題である条件付
README.md Node.jsのTypeScriptサポートについて Created: 2024-07-28 Updated: https://gist.github.com/azu/ac5dafbf211ef8b5ecf386930ac75250/revisions Node.jsのTypeScriptサポートに関する議論を時系列でまとめたものです。 Start Issue: Support typescript with --experimental-strip-types · Issue #208 · nodejs/loaders SWCを使ってTypeScriptの型を削除することで、Node.jsのTypeScriptサポートを実現するという提案からスタートした。 最初の懸念としては、Node.jsのLTSは3年保守する必要があるので、依存によってNode.jsのLTSサポー
module: add --experimental-strip-types by marco-ippolito · Pull Request #53725 · nodejs/node It is possible to execute TypeScript files by setting the experimental flag --experimental-strip-typ... 💁♀️ まだマージされてない点に注意してください --experimental-strip-typesというフラグを実行時に付けることにより、Node.jsでTypeScriptのコードを実行できるようになるPRが出てきました。 背景 TC39でも型注釈の話題(議事録を読むとブラウザとの兼ね合いもあり道のりは長そう)が存在するほどJSのコードにおいて、型は当たり前となっています。 Node.jsと同
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く