TypeScript Ajouter une variable globale à la fenêtre
declare global {
interface Window {
FB:any;
}
}
let FB = window.FB; // ok now
declare global {
interface Window {
FB:any;
}
}
let FB = window.FB; // ok now
declare global {
interface Window { MyNamespace: any; }
}
window.MyNamespace = window.MyNamespace || {};