[Web API type definition issue] Wasm64 Support

オープン 初心者向け
#2,485 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
typescript, wasm
領域
api, tooling

調査の方向性

issue で参照されている WebAssembly.AddressValue の override の周辺にある inputfiles/overridingTypes.jsonc から始め、次にジェネレーターがその定義を WebAssembly のメモリ API とテーブル API にどのように適用しているかを追跡します。生成された TypeScript 定義で、列挙された Wasm64 関連のパラメーターとプロパティに対して AddressValue が number | bigint として表現され、リポジトリの関連する生成チェックが通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

lib.d.ts bug
Summary

WebAssembly.AddressValue should be number | bigint instead of number

Expected vs. Actual Behavior

There are a bunch of APIs relying on the type definition of WebAssembly.AddressValue:

  • WebAssembly.Memory.grow()
  • WebAssembly.Table.*
  • `WebAssembly.MemoryDescriptor.*
  • WebAssembly.TableDescriptor.*

With Wasm64 memory and tables can be 64-bit, requiring some of the parameters and properties to be bigint instead of number. Currently AddressValue is defines as number, but it should be number | bigint instead.

Maybe the API could be further improved with a separate table or memory type, in which the constructor with the help of WebAssembly.MemoryDescriptor or WebAssembly.TableDescriptor can determine which type we are dealing with.

Playground Link

No response

Browser Support
  • This API is supported in at least two major browser engines (not two Chromium-based browsers).
Have Tried The Latest Releases
  • This issue applies to the latest release of TypeScript.
  • This issue applies to the latest release of @types/web.
Additional Context

This has been explicitly overwritten internally here.

主要言語
TypeScript
スター
740
フォーク
474
平均マージ
2日 8時間
マージ済み PR(30日)
15

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/TypeScript-DOM-lib-generator のほかの issue

microsoft/TypeScript-DOM-lib-generator の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。