Skip to content

docs(tutorial): declare Window members inline, not via extends - #879

Merged
harlan-zw merged 1 commit into
mainfrom
docs/confetti-tutorial-window-inline
Aug 21, 2026
Merged

docs(tutorial): declare Window members inline, not via extends#879
harlan-zw merged 1 commit into
mainfrom
docs/confetti-tutorial-window-inline

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

Follow-up to #878.

The confetti tutorial still taught declare global { interface Window extends JSConfettiApi {} } — the exact shape #878 removes from the registry. An extends clause on the global Window turns any member collision with another package into an unsuppressable TS2430 at every consumer Window augmentation (#852). Declaring the member inline is type-identical and removes that failure mode.

Discovered during adversarial review of #878; one-line snippet change, verified by pnpm lint.

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
scripts-playground Ready Ready Preview Aug 21, 2026 2:07pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 21, 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 Plus

Run ID: 19619668-bd21-4c46-8a36-3081d89fd796

📥 Commits

Reviewing files that changed from the base of the PR and between ba5f2c9 and 16213f4.

📒 Files selected for processing (1)
  • docs/content/docs/1.getting-started/3.confetti-tutorial.md

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The confetti tutorial updates its global Window augmentation. The declaration now exposes a JSConfetti property typed from JSConfettiApi['JSConfetti']. It no longer extends JSConfettiApi.

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

Merge Risk: ⚪ Minimal · up to 16213

This localized tutorial update changes the recommended Window declaration to avoid consumer-side TypeScript conflicts; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the tutorial declaration change.
Description check ✅ Passed The description explains the related type-safety issue, the inline declaration fix, and verification performed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
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
  • Commit unit tests in branch docs/confetti-tutorial-window-inline

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.

@pkg-pr-new

pkg-pr-new Bot commented Aug 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/scripts@879

commit: 16213f4

@harlan-zw
harlan-zw merged commit 8d08f47 into main Aug 21, 2026
9 of 10 checks passed
@harlan-zw
harlan-zw deleted the docs/confetti-tutorial-window-inline branch August 21, 2026 14:08
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.

1 participant