Home > OS >  Can not find 'MathJax' in Typescript
Can not find 'MathJax' in Typescript

Time:08-13

I am transitioning a Vue 3 website from Javascript to TypeScript. Mathjax is loaded from a CDN, and this field from a custom component which worked previously:

watch: {
    note_content: function () {
        this.$nextTick(MathJax.typesetPromise);
    }
}

now generates a static error which should translate as:

Can not find name 'MathJax'.ts(2304)

How can I solve this ?

CodePudding user response:

You'll need to install @types/mathjax

  • Related