Skip to content

fix: restore BottomSheetModal generic default to any - #2735

Open
Ge0ffreyS wants to merge 1 commit into
gorhom:masterfrom
Ge0ffreyS:fix/bottom-sheet-modal-generic-default
Open

Ge0ffreyS wants to merge 1 commit into
gorhom:masterfrom
Ge0ffreyS:fix/bottom-sheet-modal-generic-default

Conversation

@Ge0ffreyS

Copy link
Copy Markdown

Summary

The generic default on the internal BottomSheetModal type alias was accidentally changed from T = any to T = never in cfbe558 ("chore: updated biome and formatted the code", released in 5.2.9). That commit removed the biome-ignore comments suppressing noExplicitAny, and the default was switched to never to satisfy the lint rule instead of restoring the ignore.

Since this type isn't exported from the package's public entry point, the documented bare-ref pattern (useRef<BottomSheetModal>(null)) now resolves to BottomSheetModalMethods<never> instead of <any>, breaking under strict TypeScript.

Test plan

  • yarn typescript passes
  • yarn lint passes (no new warnings vs master)
  • Verified against a real-world app using the documented Modal example, under strict: true

The generic default on the internal BottomSheetModal type alias was
accidentally changed from `T = any` to `T = never` in cfbe558
("chore: updated biome and formatted the code", released in 5.2.9).

That commit removed the biome-ignore comments suppressing
noExplicitAny on this type, and the default was switched to `never`
to satisfy the now-unsuppressed lint rule instead of restoring the
ignore comment.

Since this type alias is not exported from the package's public
entry point, referencing it bare (e.g. `useRef<BottomSheetModal>(null)`,
as shown in the docs) now resolves to `BottomSheetModalMethods<never>`
instead of `BottomSheetModalMethods<any>`, which no longer satisfies
the `Ref<BottomSheetModalMethods<any>>` required by JSX usage without
an explicit generic. This breaks the documented usage pattern under
strict TypeScript.

This restores the pre-5.2.9 behavior.
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant