I have some extensions on window that I wish to use across my <script> tags for managing some menu states. The logic works fine with the dev server but there are type errors. Specifically Property 'scrollHiding' does not exist on type 'Window & typeof globalThis'.ts(2339)
I've tried creating a globals.d.ts file containing
declare global {
interface Window {
scrollHiding: {
header: Boolean,
footer: Boolean,
}
}
}
but this type definition isn't being picked up by TypeScript. I've also tried moving it into a src/types directory and listing it as a "typeRoots" in tsconfig/json. What do I have to do to get this typechecking?