wrobins / cordova-plugin-msal

Use the newest Microsoft MSAL library in your Cordova-based project!
Apache License 2.0
23 stars 66 forks source link

How to reference plugin from typescript #46

Closed dougmolineux closed 4 years ago

dougmolineux commented 4 years ago

Hi there! First of all, thank you for this plugin,

I am having trouble running this code:

        window.cordova.plugins.msalPlugin.msalInit(function() {
            // Success logic goes here
        },
        function (err) {
            // err has your exception message
        }, {});

It tells me

Property 'cordova' does not exist on type 'Window'.

I have tried to just omit window, and then import cordova like:

import * as cordova from 'cordova';

But it really doesn't seem to like that, what am I doing wrong here? Thank you!