Accessing cordova plugins

Hey Guys how do you avoid doing this in typescript:

        if (navigator && navigator['splashscreen']) {
            navigator['splashscreen'].hide();
        }

It’s slightly silly but at least this format works when compiling