Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preact + ts and types issue #712

Open
userquin opened this issue May 7, 2024 · 0 comments
Open

preact + ts and types issue #712

userquin opened this issue May 7, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@userquin
Copy link
Member

userquin commented May 7, 2024

Using Preact + TS:

const {
    offlineReady: [offlineReady, setOfflineReady],
    needRefresh: [needRefresh, setNeedRefresh],
    updateServiceWorker,
  } = useRegisterSW({..})

function close() {
    typeof setOfflineReady === 'function' && setOfflineReady(false)
    typeof setNeedRefresh === 'function' && setNeedRefresh(false)
  }

without the typeof check:

imagen

@userquin userquin added the enhancement New feature or request label May 7, 2024
@userquin userquin self-assigned this May 7, 2024
@userquin userquin changed the title preact + ts and types bug preact + ts and types issue May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant