react / react/react-native

Add TypeScript types for TextEncoder/TextDecoder to global type declarations

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

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

Needs: Attention Needs: Repro
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

Hey! Both TextEncoder and TextDecoder are now natively available in Hermes:

But neither is declared in React Native's TypeScript globals (src/types/globals.d.ts), so TypeScript users have to either cast through any, pull in lib: ["dom"], or add their own declarations to use these APIs without type errors.

Would be great to add the type declarations now that the runtime support is there. Happy to submit a PR if that helps.

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

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

はじめの一歩

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

調査の方向性

まず src/types/globals.d.ts を読み、既存のグローバル API がどのように宣言されているかを確認します。TextEncoder と TextDecoder の宣言を追加し、TypeScript ユーザーがキャスト、DOM ライブラリ、カスタム宣言なしで両方の API を参照できることを確認します。

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

評価

技術スタック
typescript
領域
developer-experience, mobile
issue の種類
機能追加
難易度
2/5
見積もり時間
1〜3時間
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
78/100

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

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