mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #510] [MERGED] refactor: eliminate as any / as unknown as type assertions #632
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#632
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/510
Author: @james-elicx
Created: 3/12/2026
Status: ✅ Merged
Merged: 3/12/2026
Merged by: @james-elicx
Base:
main← Head:opencode/proud-circuit📝 Commits (2)
67d67ferefactor: eliminate as any / as unknown as type assertionsd3a031bfix: restore typeof guards in restoreArrayBuffers to preserve original behaviour📊 Changes
9 files changed (+161 additions, -79 deletions)
View changed files
📝
packages/vinext/src/check.ts(+9 -8)📝
packages/vinext/src/cloudflare/kv-cache-handler.ts(+65 -25)📝
packages/vinext/src/entries/pages-server-entry.ts(+9 -10)📝
packages/vinext/src/global.d.ts(+17 -0)📝
packages/vinext/src/index.ts(+2 -2)📝
packages/vinext/src/shims/constants.ts(+1 -2)📝
packages/vinext/src/shims/fetch-cache.ts(+28 -12)📝
packages/vinext/src/shims/navigation.ts(+29 -19)📝
packages/vinext/src/shims/router.ts(+1 -1)📄 Description
Summary
Eliminates avoidable `as any` and `as unknown as` type assertions across the vinext codebase, replacing them with proper types, typed subclasses, and direct null-checks.
Changes
New types introduced
Non-null assertions removed
Unnecessary `unknown` steps removed
What was intentionally left alone
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.