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

    Cordova plugins & TypeScript

    Help
    1
    2
    180
    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.
    • F
      fractal last edited by

      I have a TypeScript project going on right now, and I’ve installed a couple of Cordova plugins,
      StatusBar and NavigationBar coloring namely.

      As per the documentation, Quasar takes care of making sure these plugins are loaded into the global namespace once the Vue instance starts.

      Typescript doesn’t know this, however, and still thinks that these objects are undefined, meaning I don’t have tooling or IntelliSense.

      714d67bd-4834-46f8-b8ab-73eca4656bd3-image.png

      Is there any way this problem could be fixed? Thanks for taking the time to read this!

      1 Reply Last reply Reply Quote 0
      • F
        fractal last edited by

        Update: I managed to fix it by just adding types to the cordova plugin folders! I just whipped up some really quick type definitions for NavigationBar (and StatusBar already had typedefs, which is cool) and no more horrible red lines. Leaving this here for anyone who might be having the same problem!

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