antfu-collective / vitesse

🏕 Opinionated Vite + Vue Starter Template

Home Page:https://vitesse.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Borderliner opened this issue · comments

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.

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

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.