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

Linting issue: Type '_ActionsTree' is missing (pinia store) #490

Closed
5 tasks done
Borderliner opened this issue Apr 21, 2023 · 2 comments
Closed
5 tasks done

Linting issue: Type '_ActionsTree' is missing (pinia store) #490

Borderliner opened this issue Apr 21, 2023 · 2 comments

Comments

@Borderliner
Copy link
Contributor

Describe the bug

I'm getting this error on the basic user.js store which comes with this project:

Argument of type 'StoreDefinition<"user", _UnwrapAll<Pick<{ setLoggedIn: (flag: boolean) => void; setName: (userName?: string | undefined) => void; setEmail: (userEmail?: string | undefined) => void; setApiKey: (userApiKey?: string | undefined) => any; ... 7 more ...; getUser: ComputedRef<...>; }, never>>, Pick<...>, Pick<...>>' is not assignable to parameter of type 'StoreDefinition<string, StateTree, _GettersTree<StateTree>, _ActionsTree>'.
  Type '_ActionsTree' is missing the following properties from type 'Pick<{ setLoggedIn: (flag: boolean) => void; setName: (userName?: string | undefined) => void; setEmail: (userEmail?: string | undefined) => void; setApiKey: (userApiKey?: string | undefined) => any; ... 7 more ...; getUser: ComputedRef<...>; }, "setLoggedIn" | ... 3 more ... | "setUser">': setLoggedIn, setName, setEmail, setApiKey, setUserts(2345)

AFAIK it's something related to hydration. But how do I get rid of this linting problem so that it doesn't cause problems in the future.

Reproduction

Clone the repo, run eslint

System Info

System:
    OS: Linux 5.19 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 2700X Eight-Core Processor
    Memory: 3.90 GB / 15.57 GB
    Container: Yes
    Shell: 3.3.1 - /usr/bin/fish
  Binaries:
    Node: 18.16.0 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 9.5.1 - /usr/bin/npm
  Browsers:
    Chrome: 112.0.5615.165

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@antfu
Copy link
Member

antfu commented Apr 21, 2023

I am not able to reproduce it. Please provide more information.

@Borderliner
Copy link
Contributor Author

Can't reproduce it either since today. Seems to be gone somehow. I'll post updates if anything comes up. Let's close this issue for now.

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

No branches or pull requests

2 participants