No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. matt-h
    M
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 1
    • Groups 0

    matt-h

    @matt-h

    2
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    matt-h Follow

    Best posts made by matt-h

    • Vuex Getters and Typescript errors

      Hi there,

      I have a quasar project which uses Vuex and the Composition API. I have enabled typescript and I’ve added Cordova.

      I have a component which needs to pull a boolean value from a getter in my store module like so:

      const flag = computed(() => store.getters['test/flag'])
      

      the code works fine while I’m developing, but if I try to build it, I get the following typescript errors:

      106:33  error  Unsafe member access ['test/flag'] on an any value  @typescript-eslint/no-unsafe-member-access
      106:33  error  Unsafe return of an any typed value                 @typescript-eslint/no-unsafe-return
      

      Let me know if I need to provide additional info, I have an example project which I can provide if necessary.

      Can anyone tell me what I need to do to safely use getters in my typescript component?

      Thanks,
      Matt

      posted in Help
      M
      matt-h

    Latest posts made by matt-h

    • Vuex Getters and Typescript errors

      Hi there,

      I have a quasar project which uses Vuex and the Composition API. I have enabled typescript and I’ve added Cordova.

      I have a component which needs to pull a boolean value from a getter in my store module like so:

      const flag = computed(() => store.getters['test/flag'])
      

      the code works fine while I’m developing, but if I try to build it, I get the following typescript errors:

      106:33  error  Unsafe member access ['test/flag'] on an any value  @typescript-eslint/no-unsafe-member-access
      106:33  error  Unsafe return of an any typed value                 @typescript-eslint/no-unsafe-return
      

      Let me know if I need to provide additional info, I have an example project which I can provide if necessary.

      Can anyone tell me what I need to do to safely use getters in my typescript component?

      Thanks,
      Matt

      posted in Help
      M
      matt-h