mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #323] [MERGED] feat: add global.d.ts for window.__VINEXT_* and globalThis.__VINEXT_* globals #479
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#479
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/323
Author: @james-elicx
Created: 3/7/2026
Status: ✅ Merged
Merged: 3/7/2026
Merged by: @james-elicx
Base:
main← Head:feat/global-d-ts-vinext-globals📝 Commits (2)
edb8065feat: add global.d.ts for window._VINEXT* and globalThis._VINEXT* globals95ec895feat: declare window.NEXT_DATA in global.d.ts, remove remaining (window as any) casts📊 Changes
8 files changed (+338 additions, -43 deletions)
View changed files
📝
packages/vinext/src/client/entry.ts(+3 -3)➕
packages/vinext/src/global.d.ts(+301 -0)📝
packages/vinext/src/server/dev-server.ts(+3 -3)📝
packages/vinext/src/server/prod-server.ts(+1 -1)📝
packages/vinext/src/shims/form.tsx(+2 -3)📝
packages/vinext/src/shims/link.tsx(+6 -8)📝
packages/vinext/src/shims/navigation.ts(+11 -13)📝
packages/vinext/src/shims/router.ts(+11 -12)📄 Description
Summary
packages/vinext/src/global.d.tsdeclaring all 23__VINEXT_*runtime globals used across the codebaseWindowinterface augmentation (browser-side),vardeclarations forself/globalThisglobals (RSC chunks, server-side manifests, locale state), andProcessEnvaugmentation for Vitedefine-replaced constants(window as any).__VINEXT_*and(globalThis as any).__VINEXT_*escape hatches fromclient/entry.ts,server/dev-server.ts,server/prod-server.ts,shims/form.tsx,shims/link.tsx,shims/navigation.ts, andshims/router.tsFiles Changed
packages/vinext/src/global.d.ts__VINEXT_*globalspackages/vinext/src/client/entry.ts(window as any)castpackages/vinext/src/server/dev-server.ts(globalThis as any)castspackages/vinext/src/server/prod-server.ts(globalThis as any)castpackages/vinext/src/shims/form.tsx(window as any)castpackages/vinext/src/shims/link.tsx(window as any)and(globalThis as any)castspackages/vinext/src/shims/navigation.ts(window as any)castspackages/vinext/src/shims/router.ts(window as any)castsTesting
pnpm run typecheck— passes with zero errorspnpm run lint— 0 warnings, 0 errorspnpm test tests/shims.test.ts tests/link.test.ts— 590/590 tests pass🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.