Skip to content

docs: explain JavaScript class inheritance bindings - #1462

Merged
fhammerschmidt merged 3 commits into
rescript-lang:masterfrom
fhammerschmidt:docs/bind-class-inheritance
Oct 21, 2026
Merged

fhammerschmidt merged 3 commits into
rescript-lang:masterfrom
fhammerschmidt:docs/bind-class-inheritance

Conversation

@fhammerschmidt

@fhammerschmidt fhammerschmidt commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

The manual explains JavaScript class constructors but does not show how to bind inheritance.

Add a concise Animal → Mammal → Dog example to the existing Bind to JS Object class section. Show the JavaScript implementation alongside the bindings. Cover private type abbreviations, explicit coercion to parent types, inherited methods, and preserving the relationship in .resi interfaces. Link the section from the type-alias documentation.

Validation: both MDX pages pass documentation compilation and generated-output checks, formatting, MDX compilation, and link validation. An isolated compiler/runtime fixture also verified coercion rules, interface visibility, method calls, and object identity.

Extend the existing class-binding section with a generic Animal, Mammal, and Dog hierarchy. Explain private type abbreviations, explicit coercion, inherited methods, runtime identity, and interface visibility. Link the guide from the type-alias section and relate it briefly to OpenLayers.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T13:02:23.684665Z 44aade1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@fhammerschmidt
fhammerschmidt requested a review from cknitt October 21, 2026 13:01
Keep the generic binding hierarchy, one coercion example, and the interface visibility rule. Remove the OpenLayers note, JavaScript implementation and output, and repeated explanations.
Show the Animal, Mammal, and Dog implementations alongside their bindings while retaining the concise explanation and single usage example.
@fhammerschmidt
fhammerschmidt merged commit 1f47ac6 into rescript-lang:master Oct 21, 2026
11 checks passed
@fhammerschmidt
fhammerschmidt deleted the docs/bind-class-inheritance branch October 21, 2026 13:14
fhammerschmidt added a commit that referenced this pull request Oct 21, 2026
Forward-port the JavaScript inheritance guide and type-alias cross-link from master PR #1462.

Source commit: 1f47ac6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants