rescript-lang / rescript-lang/experimental-rescript-webapi

Consider adding useful extension module

オープン
#5 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

主要言語
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.

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

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

はじめの一歩

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

調査の方向性

既存の API モジュールと、提案されている createElement/createInputElement の例を確認します。APIExt コンパニオンモジュールの範囲と設計を決定します。意図したモジュール構造とサポートする型付きヘルパーについて合意し、明確に仕様化できれば完了です。

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

評価

領域
frontend
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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