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

    Quasar.lang typing error "Property 'lang' does not exist on type ..."

    Framework
    2
    2
    125
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jenslueck
      jenslueck last edited by

      Hi,
      I just started to work with Typescript and stumbled over a typing error.
      When a try to switch between the quasar language files with

      Quasar.lang.set(lang.default)

      I get an error that the property ‘lang’ does not exist:Quasar Lang Error.png

      I have looked through the typing definition files and found that in index.d.ts at the end of the file (line 8714) the “lang” type is missing for Quasar. So I changed the line

      export const Quasar: { install: (app: App, options: Partial<QuasarPluginOptions>) => any }
      to
      export const Quasar: { install: (app: App, options: Partial<QuasarPluginOptions>) => any, lang: GlobalQuasarLanguage}

      and now everything works fine.
      Just in case someone else encounters the same problem.

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @jenslueck last edited by

        @jenslueck

        if you think this is a bug please create a github issue. Try to search for the issue first to prevent duplicate issues.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post