Minor but annoying problem, I’m implementing Scalderone in my chat app and Typescript always gives me this error:
“Property ‘Scaledrone’ does not exist on type ‘Window & typeof globalThis’.ts(2339)”
drone = new window.Scaledrone('XXXXXXXXXXXXXXXX', {
data: meRef.current,
});
“Scalderone” part is underlined in red
1
You can declare Scaledrone
as property of window
declare global {
interface Window {
Scaledrone:(key:string,props)=>void;
}
}
let Scaledrone = window.Scaledrone;
Also remember you need to create a index.d.ts
and add the above code there, if it is not there
1