I am getting the error below with window
declared in our TypeScript file. How can I fix this?
const { TestFrame } = window['sisense.embed'];
Element implicitly has an 'any' type because index expression is not of type 'number'.ts(7015)
I am getting the error below with window
declared in our TypeScript file. How can I fix this?
const { TestFrame } = window['sisense.embed'];
Element implicitly has an 'any' type because index expression is not of type 'number'.ts(7015)
If you have defined sisense.embed
on the global window
object, then you could ignore the error with:
const { TestFrame } = (window as any)['sisense.embed'];
See: How do you explicitly set a new property on window
in TypeScript?