rescript-lang / rescript-lang/experimental-rescript-webapi
Consider adding useful extension module
まだ誰も着手していません。
- 主要言語
- ReScript
- スター
- 40
- フォーク
- 11
- 平均マージ
- 3日 12時間
- マージ済み PR(30日)
- 12
説明
While the aspiration of this project is to have bindings for anything available in the browser, it might be interesting consider having an additional auxiliary module.
Or to phrase it differently: some API methods are shit. Like https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement. You pass it any string and get an element back. Maybe you want to create something more specific and get a better type back like document.createElement("input") and get HTMLInputElement back.
So having something like:
type document
type htmlInputElement
@scope("document")
external createInputElement: (unit, @as("input") _) => htmlInputElement =
"createElement"
let i = createInputElement()
The input string can't be misspelled and the return type is better.
Perhaps each current API module can have an APIExt companion module?
Let me know what you thoughts.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
既存の API モジュールと、提案されている createElement/createInputElement の例を確認します。APIExt コンパニオンモジュールの範囲と設計を決定します。意図したモジュール構造とサポートする型付きヘルパーについて合意し、明確に仕様化できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100