HI,
Hope you can help. I am a total typescript noob.
I copy-pasted the code snippet in to my main layout under the and came across the following problems:
1.- Property ‘SnipcartSettings’ does not exist on type ‘Window & typeof globalThis’.ts(2339).
Apparently I could fix this one editing the env.d.ts file with the following code:
export {};
declare global {
interface Window {
SnipcartSettings: any;
LoadSnipcart: any;
}
}
But there are a couple of errors that I can’t seem to figure out:
a variable “i” was declared to create an element and typescript is looking for the “src” and “async” types.
The same is happening with variable “n”, where typescript is looking for the “rel”, “type”, and “href” types with messages like the following:
2.- Property ‘rel’ does not exist on type ‘Element’.ts(2339)
I guess that i can edit the env.d.ts file but I can’t find how to do it…
Thank you for your help!
Dan.