みなさんこんにちは。 現在、フロントエンドでは宣言的UIが大流行しており、そのためのフレームワークも Vue.js をはじめ複数存在しています。 (React はフレームワークではなくライブラリです) 同種のソフトウェアや言語があれば、自分の好みを巡って意見を出し合うのはエンジニアの常でして。 それがパフォーマンス…
JavaScriptのforEachで非同期処理を逐次実行する方法
JavaScript の forEach は非同期ではない 時々ネットの解説記事で forEach は非同期だという解説を見かけますがこれは間違っています。実際の処理は逐次関数をコールバックしていくだけなので、普通に同期で動いています。コールバック中に非同期処理を使って待機動作を行っていないので、バラバラに動いているように見…
GitHub – tc39/proposal-object-pick-or-omit: Introduce `Object.{pick,omit}` for operating properties of objects more conveniently.
Object.{pick, omit} ECMAScript Proposal, specs, and reference implementation for Object.pick, Object.omit. Authors: @Aleen && Hemanth HM Motivation Let us consider a few scenarios from the real world to understand what we are trying to solve in this proposal. On MouseEvent we are intreseted on ‘c…
NestJS製GraphQLサーバの起動が遅かったので調査した話 – もうずっといなかぐらし
こんにちは、かたいなかです。 最近、NestJS製のGraphQLサーバでのSchemaからのTypescriptファイルの生成が遅い問題を調査する機会がありました。 今回の記事では、ツールの使い方等の自分への備忘録を兼ねて、どのように問題に取り組んだかを記事にして紹介します。 TL;DR 高速化するならまずは計測から。計測によるボ…
GitHub – mintlify/writer: ✍️ AI powered documentation writer
✍️ Mintlify Writer Writing documentation sucks. Let Mintlify take care of it. Just hightlight code and see the magic. 👩💻 How to generate documentation Step 1 Highlight code or place cursor on the line you want to document Step 2 Click on the Write Docs button (or hit ⌘ + .) 📝 Languages supported …
ブラウザ, Node, Cloudflareでも動くDenoモジュール開発
ブラウザだけでなく、非ブラウザなJavaScript(JS)処理系も増えてきたので、「主要ブラウザ、Node.js、Cloudflare Workersでも動くDenoファーストなTypeScript/JavaScriptモジュール開発&CI/CD」をやってみました。一事例として共有します。 はじめに 最近、TypeScriptで hpke-js というモジュールをつくりました。 HP…
Maintainer Month: オープンソースのメンテナーがやっている仕事
2022年の6月は、GitHub主催でMaintainer Monthは、オープンソースのメンテナーが集まって情報共有したり、メンテナーを祝ったり、支援したりするイベントが行われていました。 Welcome to Maintainer Month! 🎉 | The GitHub Blog Maintainer Monthに気づいたのはThank you to our maintainers | The GitHub Blogのとき(…
GitHub – codemix/deprank: Use PageRank to find the most important files in your codebase.
Deprank Deprank uses the PageRank algorithm to find the most important files in your JavaScript or TypeScript codebase. It uses dependency-cruiser to build a dependency graph of your source files, then ranks those dependencies based on their importance. We define importance as those files which a…
Extreme Explorations of TypeScript’s Type System | Learning TypeScript
TypeScript’s type system is Turing Complete: meaning it has conditional branching (conditional types) and works with an arbitrary huge amount of memory. As a result, you can use the type system as its own programming language complete with variables, functions, and recursion. Developers have push…
Reactのchildrenの型で子コンポーネントを制御する(したかった)
反響がけっこうあったので、用途を深掘ってみようと思います。が、先に訂正があります。 ReactElement<Props>で特定のコンポーネントを指定できると思っていたのですが、色々試したところコンポーネントの指定までは難しいようでした。早とちりですいません。 JSXに書かれたコンポーネントはJSX.Elementとなるため、詳細…