rescript-lang / rescript-lang/experimental-rescript-webapi
Simplify package module/type structure
Ouverte
@jderochervlk y travaille déjà.
Depuis le 18/4/2026.
- Langage dominant
- ReScript
- Étoiles
- 40
- Forks
- 11
- Merge moyen
- 3 j 12 h
- PR mergées (30 j)
- 12
Description
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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Évaluation
Cette issue n'a pas encore été évaluée.