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
Cap'n Web is a spiritual sibling to Cap'n Proto (and is created by the same author), but designed to play nice in the web stack. That means: Like Cap'n Proto, it is an object-capability protocol. ("Cap'n" is short for "capabilities and".) We'll get into this more below, but it's incredibly powerful. Unlike Cap'n Proto, Cap'n Web has no schemas. In fact, it has almost no boilerplate whatsoever. Thi
ESLint コアルールの TypeScript 対応について ESLint v9.23.0 で ESLint のコアルールの TypeScript 対応が開始しました。 その後の ESLint のアップデートでもコアルールの TS 対応が進んでいます。ESLint コアの責務を増やすような機能追加は少し意外だと感じたので、その背景について調べてみました。 背景: 従来のコアルールの拡張方法の課題 ESLint のコアルールは JavaScript を想定して書かれたものであるが、TypeScript に対してもほぼ期待通り動作するルールが多い。TypeScript は JS のほぼ上位互換な言語であるため、TypeScript 用のパーサー (@typescript-eslint/parser) が吐き出す AST もほぼ JS の上位互換であり、パーサーさえ TS 用のものを使えば多く
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-types. Node.js will transpile TypeScript source code into JavaScript source code. During the transpi... 💁♀️ まだマージされてない点に注意してください --experimental-strip-typesというフラグを実行時に付けることにより、Node.jsでTypeScriptのコードを実行できるようになる
こんにちは!アルダグラムのKANNAの開発お手伝いをさせて頂いているoubakiouです。 本記事は株式会社アルダグラム Advent Calendar 2023 6日目の記事です。 この記事を読めば以下のTypeScript(JavaScript)のテストコードがなぜこけるのかが分かったような気持ちになります。また最後に「細かい理屈はいいからいけてる感じに動くlengthやtruncateがほしい!」という方向けの付録もついています。 it('surrogate pair', () => { // 2 expect('😊'.length).toEqual(1) }) it('variation selectors', () => { // 4 expect('👍🏿'.length).toEqual(1) }) it('combining character', () => { //
この記事について Zenn では長らく通信処理に Axios を使っていました。 しかし、Fetch API が多くのモダンブラウザなどで普通に使えるようになった今、使う必要性があまり無くなったため、Axios を使っている処理を全て Fetch API に置き換えることになりました。 この記事では、その置き換え作業をどう進めていったのか、その結果どう良くなったのかを解説していこうと思います 🗽 解説より置き換えた結果を知りたいのよ私は!!! って方が居るかと思いますので、最初に置き換えたことで良くなった部分を紹介しようと思います。 まず一番良くなったところといえば、ずばりサイト全体のビルドサイズが 10 KB も減りました。( ちなみに、10 KB は圧縮時のサイズで、圧縮しない場合 100 KB になります 😇 ワーオ ) グローバルのビルドサイズが 103.35KB gzip 時
これは、今後ECMAScriptに盛り込まれることが見込まれる「Class fields」(stage 3)の言語仕様の一部をTypeScriptに取り入れたものです。なので、TypeScript固有の仕様ではなく、JavaScriptと共有する仕様となっています。 Class fields - JavaScript | MDN tc39/proposal-class-fields: Orthogonally-informed combination of public and private fields proposals TypeScriptにおいては、3.8で導入された仕様です。 TypeScript 3.8 · TypeScript TypeScriptコンパイラは、このECMAScript Private Fields構文を、ES2015に対応している環境なら動くようなJSコー
npm パッケージとして複数のエントリーポイントを公開したい場合、mainフィールドは単一のエントリーポイントしか受け付けないので、exportsフィールドを利用することになると思うけども、その仕様等についての確認メモ。 In a package’s package.json file, two fields can define entry points for a package: "main" and "exports". The "main" field is supported in all versions of Node.js, but its capabilities are limited: it only defines the main entry point of the package. https://nodejs.org/api/packages.html#p
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 are directly or indirectly depended upon the most by other files in the codebase. Deprank is particularly useful
Node.jsのNative ESM対応は夢の機能ですが、夢を詰め込みすぎたせいかCJSからの移行を難しくしているポイントが依然として存在します。そのひとつが拡張子問題で、Node.jsのNative ESMではモジュールの拡張子を明示しなければいけなくなりました。 (これはWebブラウザの挙動に近づけるための判断だと考えられます。) 特にTypeScriptと他のツール (JestやWebpack) と組み合わせて利用している状態でのNative ESM化は実質的に未解決の状態だと言えます。本稿ではこの現状についてできる範囲で状況説明を試みます。 Node.jsの拡張子の扱い Node.jsはCJSとESMの2つのモジュールフォーマットをサポートしていますが、これらは単にパーサーが異なるだけではなく、実質的には「2種類の異なるモジュールシステムがFFIで繋がっている」程度には隔たりがあり
Photo by Matthew Manuel on UnsplashLast Wednesday, on 9th March 2022, Microsoft announced their support of a remarkable proposal for the further development of JavaScript and TypeScript. So far, this is only a suggestion that is available as a so-called Stage 0 proposal, but Microsoft has already announced that they want to submit this proposal to the TC39 (Technical Committee 39) on time. If this
Make ship happenTurborepo is the build system for JavaScript and TypeScript codebases
Gzemnid はざっくりしていて完璧に信用はできないが、十分に使われていることはわかる。 特に Node や Deno などの JavaScript ランタイムや polyfill 系ライブラリでは、プロトタイプ汚染などを避けるために多用されている。 にもかかわらず、.bind と .call は自然言語の SVO 的な思考の流れに反していてむずかしい。実際のユースケースで見比べてみるとわかる。 // bluebird@3.5.5/js/release/synchronous_inspection.js return isPending.call(this._target()); return this._target()::isPending(); // ajv@6.10.0/lib/ajv.js validate = macro.call(self, schema, parentSc
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く