For any app in apps, I need a global.d.ts having some types like this
interface Window{
analytics: any;
}
It needs to be reusable and shifted to packages/types and can be used anywhere in apps.
I moved the Window type to packages/types but global types weren't working while importing in apps.
Setting this up properly requires a few steps:
shared-typespackage inside thepackagesfolder of your monorepopackage.jsonofshared-types, define where the types are located:shared-typesdependency to the apps that need itSee this Sharing Code and Internal Packages sections of the Turborepo docs for more details.