# vuex-class typed getters with parameters

> vuex-class' documentation doesn't come with clear steps on how one could call a getter with one or more arguments. Here's how you do it:

- URL: https://graffino.com/til/vuex-class-typed-getters-with-parameters
- Author: Nick Ciolpan
- Channel: vue
- Published: 2021-03-18
- Updated: 2021-04-11

[vuex-class](https://github.com/ktsn/vuex-class)' documentation doesn't come with clear steps on how one could call a getter with one or more arguments. 

Here's how you do it: 

```
  @workspaces.Getter
  protected workspace: WorkspaceType | null = null;
  
  public byId!: (id: WorkspaceId) => WorkspaceType;
  
  mounted(): void {
    this.workspace = this.byId({ id: this.activeWorkspaceId });
  }
```
