Skip to content
Discussion options

You must be logged in to vote

As documented, you need to type the return when using this. in getters;

getters: {
    rights: (state) => state.userInfo?.rights,
    menuRights(): UserInfo['rights'] | undefined {
      return this.rights?.filter((v) => v.type === 0);
    },
  },

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
3 replies
@LoveofRedMoon
Comment options

@andreyan-andreev
Comment options

@the-mwolf
Comment options

Answer selected by posva
Comment options

You must be logged in to vote
4 replies
@vis97c
Comment options

@BobidaHombre
Comment options

@AxelConceicao
Comment options

@209
Comment options

Comment options

You must be logged in to vote
1 reply
@posva
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
9 participants
Converted from issue

This discussion was converted from issue #1075 on February 18, 2022 08:54.