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
必要もないのに querySelector や querySelectorAll の型引数を指定しないようにしましょう. (この記事は AI レビュワーに「型引数を指定した方が型安全だ」と提案されたのに対する反論として作成しています.) querySelector の型安全性 querySelector や querySelectorAll の型定義は, 後述する要素型セレクターに関連する部分を除くと, 基本的には以下のようになっています. querySelector<E extends Element = Element>(selectors: string): E | null; querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>; これはつまり型引数が Element を継承し
この記事では、TypeScript の開発環境を最速で整えます。単に動く環境ではなく、最低限必要なツールも一通りそろえていきます。(2025 年秋時点の情報です) この記事で作る開発環境について この記事のゴール bun run コマンドで TypeScript ファイルを実行できる bun repl コマンドで REPL を起動して TypeScript を実行できる bun tsc --noEmit コマンドで(厳しい)型チェックができる TypeScript Language Server でコード補完と型チェックができる bun biome コマンドでフォーマットとリントができる Biome の拡張機能でリントが開発中にも実行される Biome の拡張機能でフォーマットと自動修正が保存時に自動で実行される bun test コマンドでテストコードを実行できる Bun の拡張機能でテ
Connect, collaborate, and grow with a community of TypeScript developers. Elevate your skills through interactive coding challenges, discussions, and knowledge sharing
Infrastructure as TypeScript Deploy to Cloudflare, AWS, and more with pure TypeScript. Generate support for any API in minutes with AI. const database = await Database("my-database"); const website = await Worker("website", { bindings: { DB: database, }, }); const price = await Price("basic-license", { currency: "usd", unitAmount: 2999, // $29.99 product: "prod_xyz" }); const database = await Data
個人開発で CockroachDB を使いたかったのだが、有名どころの drizzle や Prisma でマイグレーションしようとすると、うまくいかなかった。 drizzle-orm はそもそも CockroachDB サポートが計画段階なのだが、PostgreSQL 互換だし動くだろうと思って pg ドライバで動かすとマイグレーションでデータ型関連のエラーが発生してしまう。Prisma も原因は別だが CockroachDB 特有の機能でエラーが起きる。 では、なにかNode.js系のマイグレーションツールを適当に採用しようか... という所だが、よくあるやつはマイグレーションのSQLやコードそのものを基本的に手書きする。これがやりたくない。理想的には Ruby 界隈の ridgepole のように宣言的なスタイルでマイグレーションができ、かつ Node.js エコシステムと親和性の高
A dead-simple TypeScript compiler that does one thing really well: enables compile-time evaluation of expressions marked with comptime. This is useful for optimising your code by moving computations from runtime to compile time. This project was inspired by Bun macros and Zig comptime (hence the name). Warning: You are responsible for ensuring that the expressions you mark with comptime are safe t
Today we are excited to announce the release of TypeScript 5.9! If you’re not familiar with TypeScript, it’s a language that builds on JavaScript by adding syntax for types. With types, TypeScript makes it possible to check your code to avoid bugs ahead of time. The TypeScript type-checker does all this, and is also the foundation of great tooling in your editor and elsewhere, making coding even e
We are happy to announce that Biome v2 is officially out! 🍾 Biome v2—codename: Biotype, the first JavaScript and TypeScript linter that provides type-aware linting rules that doesn’t rely on the TypeScript compiler! This means that you can lint your project without necessarily installing the typescript package. With this release, the Core Contributors of the project want to show to the whole comm
はじめに TypeScriptで開発していると、エラーハンドリングの難しさに直面することがあります。 定番のResult型やEither型などの素晴らしいアプローチもありますが、これらは導入コストが高く、チーム全体に浸透させるのが難しいこともあるでしょう。 本記事では、小さく始められてチームに浸透させやすい、Branded Typeを使って型安全なエラーハンドリングを実現する方法を紹介します。 自己紹介 カミナシ StatHackカンパニーの かわりくです! 普段は食品表示ラベルをAIで検査するプロダクトを開発しています! kaminashi.jp note.kaminashi.jp TypeScriptの例外処理の問題点 1. catchブロックのerrorはunknown型になる const invalidJson = '{"name": "John",}'; try { const
tskaigi で susisu さんの Generator で Promise ランタイムを作る発表をみて、昔作ったやつがもっとやれそうな気がしたので、やってみた話。 やりたいこと TS の言語システムが物足りなくて、ドメインを表現しきれない。とくに副作用を持つ関数に、なんとかして副作用の型を宣言したい。 過去に、 Async Generator でこれができるのを確認した。 function print(): void & Eff<Operation.Console> { console.log("hello"); } async function* main() { yield print(); } for await (const _eff of main()) { } // この型が最終的に発生した副作用の合計を表現する export type MainOps = GetEffe
To address ever increasing scaling demands, the TypeScript team has embarked on a port of the TypeScript compiler to native code. This port brings a 10x speed-up in compile time, project load, and other operations on most codebases! Our talk will cover the journey of how our team committed to a native port, why we chose Go, how the port will improve your workflow, and what the path to completion l
This past March we unveiled our efforts to port the TypeScript compiler and toolset to native code. This port has achieved a 10x speed-up on most projects – not just by using a natively-compiled language (Go), but also through using shared memory parallelism and concurrency where we can benefit. Since then, we have made several strides towards running on large complex real-world projects. Today, w
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く