I am trying to build a nice windows phone application with an HTML front end. I want to use TYPESCRIPT to do my processing onto my html page. There is one javascript funct
You need to tell typescript that this function exists on window.external
in order to use it. So :
interface External{
notify: Function;
}
if (window.external.notify != undefined)
window.external.notify("your message");
//notif.js
let notify = function(message) {
alert(message);
}
//test.ts
declare function notify(message: string): any;
if(notify != undefined)
notify("your message");
Make sure notif.js is loaded first.