Skip to content

Conversation

Copy link

Copilot AI commented Dec 9, 2025

Eliminated unsafe type assertions to satisfy the no-unsafe-type-assertion lint rule while maintaining type safety.

Key changes:

  • src/components/merge.ts: Added generic type parameter to mergeDeeply, removed unnecessary assertions from caller, added runtime type guard for object merging. One suppression remains for unavoidable function type widening.

  • demo/components/Leaflet.tsx: Replaced as any with as unknown as Record<string, unknown> double assertion and bracket notation for deleting private _getIconUrl property.

  • demo/components/Code.tsx: Replaced as any with typed intersection Window & {Prism?: {manual?: boolean}} for global Prism configuration.

All assertions that remain either have explicit suppressions with justification or are proven safe by TypeScript's type narrowing.


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

@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2025

⚠️ No Changeset found

Latest commit: c00e284

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI changed the title [WIP] Enable no unsafe type assertion Fix unsafe type assertions for oxlint no-unsafe-type-assertion rule Dec 9, 2025
Copilot AI requested a review from stipsan December 9, 2025 17:35
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