docs(claude): correct getDestinations() override guidance#174
Merged
Conversation
CLAUDE.md listed `getDestinations()` alongside `getEntities()`, `getLiveData()`, and `getSchedules()` under "Public API (DO NOT OVERRIDE)". That's wrong — only the latter three are marked `@final` in the base class. `getDestinations()` is designed to be overridden to provide the top-level DESTINATION entity, and 8+ existing parks do exactly that (phantasialand, plopsa, fujiq, lotteworld, qiddiyacity, seaworld, toverland, parcsreunidos). The implementing-parks skill guide already has the correct pattern; only the top-level CLAUDE.md was misleading. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the contributor documentation for Destination to correctly describe which public methods are final vs intended for subclass overrides, aligning CLAUDE.md with the actual src/destination.ts base-class behavior and existing park implementations.
Changes:
- Corrects the “Public API (DO NOT OVERRIDE)” guidance to list only
getEntities(),getLiveData(), andgetSchedules()as@final. - Adds explicit guidance that
getDestinations()is expected to be overridden to provide top-levelDESTINATIONentities (defaulting to[]).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLAUDE.md listed
getDestinations()alongsidegetEntities(),getLiveData(), andgetSchedules()under "Public API (DO NOT OVERRIDE)". That's wrong — only the latter three are marked@finalin the base class:Destination#getEntities()→@final(line 785)Destination#getLiveData()→@final(line 855)Destination#getSchedules()→@final(line 942)Destination#getDestinations()→ returns[]by default, designed to be overridden8+ existing park implementations override
getDestinations()to provide the top-level DESTINATION entity (phantasialand, plopsa, fujiq, lotteworld, qiddiyacity, seaworld, toverland, parcsreunidos). The.claude/skills/implementing-parks.mdguide already documents the correct pattern; only the top-level CLAUDE.md was misleading.Discovered while reviewing #173 (Flamingo Land), which also overrides
getDestinations().Test plan
@finalannotations ongetEntities/getLiveData/getSchedulesgetDestinations()returns[]by default and is not marked@final🤖 Generated with Claude Code