Skip to content

docs: remove non-existent sendEventStream from createEventStream example#1450

Merged
pi0 merged 1 commit into
h3js:mainfrom
sueun-dev:docs/event-stream-example
Jul 10, 2026
Merged

docs: remove non-existent sendEventStream from createEventStream example#1450
pi0 merged 1 commit into
h3js:mainfrom
sueun-dev:docs/event-stream-example

Conversation

@sueun-dev

@sueun-dev sueun-dev commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

The createEventStream example imports sendEventStream:

import { createEventStream, sendEventStream } from "h3";

But h3 does not export sendEventStream, and the example never uses it — it only calls createEventStream and eventStream.push(...). Copying the snippet gives an unresolved import.

Dropped the stray name from the JSDoc example in src/utils/event-stream.ts and regenerated the mirrored docs with automd, so docs/2.utils/2.response.md matches.

Checked: pnpm build and pnpm exec vitest --run both pass.

Summary by CodeRabbit

  • Documentation
    • Updated event stream examples to remove an unused import.
    • Ensured documentation snippets show only the required event stream utility.

The createEventStream JSDoc example imported sendEventStream, which h3
does not export. Copying the snippet gives an unresolved import.
@sueun-dev
sueun-dev requested a review from pi0 as a code owner July 10, 2026 05:42
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a88d29f5-85cf-47d2-99c1-f8d33cd6a98e

📥 Commits

Reviewing files that changed from the base of the PR and between 3eb3a57 and 6589749.

📒 Files selected for processing (2)
  • docs/2.utils/2.response.md
  • src/utils/event-stream.ts

📝 Walkthrough

Walkthrough

SSE examples in the response documentation and event-stream utility JSDoc now import only createEventStream, removing the unused sendEventStream named import.

Changes

SSE example import cleanup

Layer / File(s) Summary
Synchronize SSE example imports
docs/2.utils/2.response.md, src/utils/event-stream.ts
The documentation and JSDoc examples now import only createEventStream from "h3".

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

I’m a bunny with a tidy pack,
One import stays, one hops back.
The stream examples now look bright,
No unused name in sight.
Hop, hop—clean code tonight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the non-existent sendEventStream import from the createEventStream example.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pi0
pi0 merged commit 536f224 into h3js:main Jul 10, 2026
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.

2 participants