Skip to content

Commit 49e227d

Browse files
committed
pr feedback
1 parent 536a2e0 commit 49e227d

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

docs/content/docs/contributing/api-module-structure.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ type rec node = {
6161
// ... more properties
6262
}
6363
64-
and element = Base.element
64+
and element = Base.Element.element
6565
```
6666

67-
For shared DOM base interfaces such as `Element`, the structural record can live in a Base-owned module such as `Base__Element.res`. The DOM API module then keeps the familiar `DOM.element` alias while method modules use `DomTypes.element`.
67+
For shared DOM base interfaces such as `Element`, the structural record can live in a Base-owned module such as `Base__Element.res`. `Base.res` should re-export that implementation as a module, for example `module Element = Base__Element`, so the DOM API module can keep the familiar `DOM.element` alias while method modules use `DomTypes.element`.
6868

6969
## Auxiliary Types
7070

docs/content/docs/contributing/module-type-structure.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ external checkValidity: htmlButtonElement => bool = "checkValidity"
8282

8383
```ReScript
8484
// Base.res
85-
type element = Base__Element.element
85+
module Element = Base__Element
86+
module Document = Base__Document
8687
8788
// DomTypes.res
88-
type element = Base.element
89+
type element = Base.Element.element
8990
9091
// Element.res
9192
include Impl({type t = DomTypes.element})

docs/superpowers/specs/2026-04-22-unmonorepo-webapi-design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ The unified build keeps the original flat module surface instead of adding gener
124124
- `WebAPI.Headers`
125125
- `WebAPI.URL`
126126

127-
Shared DOM base types can be owned by `Base` when they are needed across feature boundaries, while `DOM` can keep short public aliases such as `DOM.element`. For example, `Base__Element.element` is exposed through `Base.element`, then reused as `DomTypes.element` and `DOM.element`.
127+
Shared DOM base types can be owned by `Base` when they are needed across feature boundaries, while `DOM` can keep short public aliases such as `DOM.element`. For example, `Base__Element` is exposed through `Base.Element`, then `Base.Element.element` is reused as `DomTypes.element` and `DOM.element`.
128128

129129
## Internal Module Naming
130130

0 commit comments

Comments
 (0)