-
-
Notifications
You must be signed in to change notification settings - Fork 981
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
acceptHMRUpdate
type error when switching to TS 5.0
#2098
Labels
bug
Something isn't working
contribution welcome
has workaround
The issue contains a temporary solution to get around the problem
typescript
This issue is related to typings
Comments
This comment was marked as spam.
This comment was marked as spam.
Not great, but adding if (import.meta.hot) {
import.meta.hot.accept(acceptHMRUpdate(useUserStore as any, import.meta.hot));
} or add a shim # shim-pinia.d.ts
// TODO: https://github.com/vuejs/pinia/issues/2098
declare module 'pinia' {
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
export function acceptHMRUpdate(initialUseStore: StoreDefinition | any, hot: any): (newModule: any) => any;
}
export {} |
3ddysan
added a commit
to 3ddysan/poka
that referenced
this issue
Mar 29, 2023
- patch @vue/tsconfig for typescript 5 compatibility - pinia and typescript 5 type error: vuejs/pinia#2098
posva
added
bug
Something isn't working
contribution welcome
typescript
This issue is related to typings
has workaround
The issue contains a temporary solution to get around the problem
labels
Apr 3, 2023
Using as |
jaap3
added a commit
to jaap3/pti-tools
that referenced
this issue
Apr 16, 2023
kalvenschraut
added a commit
to RTVision/pinia
that referenced
this issue
Apr 18, 2023
posva
added a commit
that referenced
this issue
Apr 20, 2023
arnoson
pushed a commit
to miwos/app
that referenced
this issue
May 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
contribution welcome
has workaround
The issue contains a temporary solution to get around the problem
typescript
This issue is related to typings
Reproduction
https://github.com/josh-hemphill/pinia_bug-report
Steps to reproduce the bug
acceptHMRUpdate
function)tsc --noEmit
Expected behavior
For there not to be a type error
Actual behavior
Type error is thrown:
Additional information
No response
The text was updated successfully, but these errors were encountered: