every time I I reference Snipcart within my angular project I get an error Cannot find name ‘Snipcart’
The script is loaded prgramatically before any trial to refernce Snipcart
Is there any missing lines of code that I need to add so I can make this reference to JavaScript SDK API without issue
For example
document.addEventListener('snipcart.ready', () => {
if (window.Snipcart) {
const count = Snipcart.api.items.count();
} else {
console.error("Snipcart is not initialized yet");
}
});
}