by AgentME · 9y ago · 0 comments
declare var $: any;
$( "element" ).compiler.leaves.you.alone
declare module 'themodule' { var mock: any; export default mock; }
But unless the lib doesn't propagate through your code at all, it pays of to give it proper typings.
declare var Thing : any;
In a global definition file.Pro tip. We've got a lot of mixed js and ts at the moment and when you're really lazy you can take advantage of how every object is a dictionary in js and just do something like `window["notification"]` instead of window.notification, which resolves to an 'any' type in ts.
Obviously you should try and minimise that usage, but it's a useful trick to know.