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
2
Answers
You can declare
Scaledrone
as property of windowAlso remember you need to create a
index.d.ts
and add the above code there, if it is not thereMake sure oo include the Scaledrone library in the head section of your HTML file.
You can read more about it from Scaledrone’s documentation.