title: pinia: Define getters and actions in function notation
body: <p>I am in the process of implementing a pinia store in function notation and am wondering how to declare the getters and actions.</p>
  <p>Are these implemented as simple functions without distinction?</p>
  <pre><code>import { defineStore } from 'pinia'
  import HttpService from '../services/BaseHttpService';
  import { ref } from 'vue'
  import { User } from '../models/user.model';
  
  const httpService = new HttpService('/users');
      
  export const useUserStore = defineStore('user', () =&gt; {
      const authedUser = ref(new User())
      const users = ref&lt;User[]&gt;([])
  
      function authed() {
          return typeof authedUser.value['@id'] === &quot;string&quot;;
      }
  
      function login(data: { email: string, password: string }) {
          const http = new HttpService('/login');
          return http.post(data).then((response) =&gt; {
              authedUser.value = response
              users.value = [...users.value, response]
          })
      }
  
      function getter() {
          return users.value;
      }
  
      function action(id: number) {
          httpService.get(id).then((response) =&gt; {
              users.value = [...users.value, response]
          })
      }
  
      return {authedUser, users, authed, login}
  })
  </code></pre>