question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latest vue-tsc release breaks templates that use global variables.

See original GitHub issue

vue-tsc 0.34.12 breaks the following code:

<template>
  <div>
    <router-link to="/"> Home</router-link> |
    <router-link to="/about">About</router-link> |
    <a href="#" @click="$msal.instance.logoutRedirect()">Logout</a>
  </div>
  <router-view></router-view>
</template>

You get the error: Property '$msal' does not exist on type...

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rchlcommented, Sep 28, 2022

It seems to work with "target": 2.7 in tsconfig.json.

1reaction
rchlcommented, Sep 22, 2022

For Nuxt 2 projects you want to install @nuxt/types and add it to types in tsconfig.json.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use global variables in Vue.js templates?
According to the documentation, you have to use the built-in function $t() which takes a string as a parameter, that is also the...
Read more >
vue-tsc | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Global variables - Issue Templates for Jira
View all predefined system variables. You may use them in your templates but you won't be able to edit them. Create a new...
Read more >
Automations and Templates — ESPHome
Every parameter in actions that has the label “templatable” in the docs can be templated like above, using all of the usual lambda...
Read more >
Configuring Vitest
In addition to the following options, you can also use any configuration option from Vite. For example, define to define global variables, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found