I'm using Googles "Material Design Lite" library with Microsoft's TypeScript inside of Visual Studio 2015. I have a script tag in my Index.html page as so:
<script src="https://cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.0.6/material.min.js"></script>
Inside one of my typescript modules I hacked in a variable to get access to the Material Design Lite (MDL) library functions as so:
module Default {
'use strict';
export var componentHandler = window['componentHandler'];
This works as shown below to update the MDL DOM, but I would prefer a more elegant way. This way seems really "hacky". Is there some way to create this global variable to the MDL functions in a typescript definition file?
Default.componentHandler.upgradeDom();