Simplify package module/type structure
維護者通常 13 天內回覆
@jderochervlk 已經在處理了。
開始於 2026年4月18日。
評估
這個 Issue 還沒有評估資料。
描述
Summary
Pre-alpha breaking cleanup to simplify the package structure and make the public surface more consistent.
This issue tracks the refactor to:
- rename root
*APItype-holder modules to*Types - keep the existing folder structure for concrete modules
- export the primary concrete type as
t - selectively re-export additional public helper types from the concrete module that uses them
- remove unrelated
openusage - remove trivial primitive aliases like
string,bool,unit, and low-value callback aliases where they do not add meaning - remove
windowandnavigatorfromGlobalwithout deletingGlobal - shift access toward owner modules such as
Window,Navigator,History,Storage,Performance, and similar modules - avoid introducing any new
includedirectives as part of the simplification
Out Of Scope
- contributor docs
- code-generation conventions
- deleting
Global - flattening the folder structure
Execution Order
- #239 must land first
- #238, #240, #241, and #243 can run in parallel after #239
- #242 is the final integration pass
Linked Issues
- #239 Shared groundwork for package simplification
- #238 Simplify DOM, event, and observer module surfaces
- #240 Simplify fetch, file, canvas, URL, and socket module surfaces
- #241 Move runtime capability access away from Global window and navigator
- #243 Simplify media and device module surfaces
- #242 Final integration for package simplification
Acceptance Criteria
- No root
src/*API.restype-holder files remain; they are replaced bysrc/*Types.res. - The existing folder structure remains in place.
- Each concrete module exports its main type as
t. - Concrete modules selectively re-export secondary public types only where justified.
- Unrelated
openusage is removed. - No new
includedirectives are introduced by this refactor. - Trivial primitive aliases are removed instead of being renamed or moved.
Global.windowandGlobal.navigatorare removed.- Source and tests stop depending on
Global.windowandGlobal.navigator. - The package passes
npm run buildandnpm testafter integration.
- 主要語言
- ReScript
- 星號
- 41
- 分支
- 11
- 平均合併
- 10 天 23 小時
- 30 天內合併 PR
- 9
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
rescript-lang/experimental-rescript-webapi 的其他 Issue
-
Add an opt-in SafeFetch wrapper for result-based Fetch workflows可能已有人在做 @jderochervlk 於 35 天前認領。 未關閉enhancement
難度 5/5 一週以上 新手友好度 38/100
rescript-lang/experimental-rescript-webapi#363 ·
維護者通常 13 天內回覆
-
難度 5/5 一週以上 新手友好度 35/100
rescript-lang/experimental-rescript-webapi#236 · 1 則留言 ·
維護者通常 13 天內回覆
-
help wanted
難度 5/5 一週以上 新手友好度 25/100
rescript-lang/experimental-rescript-webapi#27 · 1 個 reaction ·
維護者通常 13 天內回覆
-
API overview未關閉help wanted
難度 5/5 一週以上 新手友好度 25/100
rescript-lang/experimental-rescript-webapi#23 ·
維護者通常 13 天內回覆
-
難度 5/5 一週以上 新手友好度 25/100
rescript-lang/experimental-rescript-webapi#5 · 3 則留言 ·
維護者通常 13 天內回覆