Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 10, 2025

Issue

The API documentation in docs/reference/README.md had an error in the TypeScript interface definition for TranslationBookChapter. The property for next chapter audio links was incorrectly named thisChapterAudioLinks instead of nextChapterAudioLinks, creating a duplicate property name.

Issue Screenshot

Changes

This PR fixes the documentation to match the actual TypeScript interface defined in packages/helloao-tools/generation/api.ts:

  1. Corrected property name: Changed the duplicate thisChapterAudioLinks on line 367 to nextChapterAudioLinks
  2. Added missing type annotation: Added | null to both nextChapterAudioLinks and previousChapterAudioLinks to accurately reflect that these properties can be null
  3. Fixed incorrect comment: Corrected the comment for previousChapterAudioLinks from "Null if this is the last chapter" to "Null if this is the first chapter"

Before

nextChapterAudioLinks: TranslationBookChapterAudioLinks | null;
thisChapterAudioLinks: TranslationBookChapterAudioLinks;  // ❌ Wrong - duplicate name
previousChapterAudioLinks: TranslationBookChapterAudioLinks;  // ❌ Missing | null

After

nextChapterAudioLinks: TranslationBookChapterAudioLinks | null;  // ✅ Correct
previousChapterAudioLinks: TranslationBookChapterAudioLinks | null;  // ✅ Fixed

The documentation now correctly matches the actual API implementation and the JSON examples already present in the same file.

Fixes #[issue number]

Original prompt

This section details on the original issue you should resolve

<issue_title>thisChapterAudioLinks repeated in README.md</issue_title>
<issue_description>thisChapterAudioLinks is repeated instead of using nextChapterAudioLinks in the README.md file

Image</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #25


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: KallynGowdy <5075285+KallynGowdy@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix repeated thisChapterAudioLinks in README.md Fix thisChapterAudioLinks duplication in API documentation Oct 10, 2025
Copilot AI requested a review from KallynGowdy October 10, 2025 14:58
@KallynGowdy KallynGowdy marked this pull request as ready for review October 10, 2025 15:00
@KallynGowdy KallynGowdy merged commit 5df1d09 into main Oct 10, 2025
3 checks passed
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.

thisChapterAudioLinks repeated in README.md

2 participants