fix(useDocumentVisibility): fix type inference from string to Documen…#5248
Merged
antfu merged 1 commit intovueuse:mainfrom Jan 14, 2026
Merged
fix(useDocumentVisibility): fix type inference from string to Documen…#5248antfu merged 1 commit intovueuse:mainfrom
antfu merged 1 commit intovueuse:mainfrom
Conversation
OrbisK
approved these changes
Jan 13, 2026
antfu
approved these changes
Jan 14, 2026
@vueuse/components
@vueuse/core
@vueuse/electron
@vueuse/firebase
@vueuse/integrations
@vueuse/math
@vueuse/metadata
@vueuse/nuxt
@vueuse/router
@vueuse/rxjs
@vueuse/shared
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5248 +/- ##
=======================================
Coverage 64.36% 64.36%
=======================================
Files 343 343
Lines 6586 6586
Branches 2001 2001
=======================================
Hits 4239 4239
Misses 1946 1946
Partials 401 401 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix type inference from string to DocumentVisibilityState
Before submitting the PR, please make sure you do the following
fixes #123).Description
Fix type inference in useDocumentVisibility by adding generic type parameter to shallowRef('visible') to ensure it returns DocumentVisibilityState instead of string.
Additional context