I don't know how to do this. I think this is the wrong approach, so I stopped but saved what i tried. open questions:
How do we make this importable by others as just types on window?
Should we have window.ai (the extension) export the types in public-interface.ts somehow, and people just depend on the extension but it only exports those types? If not, any way to keep it in sync with the extension, or fine to manually update this?
If not, should the types library export a declaration file or a types file? (Seems like the former so far.)
What should the monorepo packages be named?
How do we patch the global window namespace? Doesn't seem to work from within an imported monorepo package
I don't know how to do this. I think this is the wrong approach, so I stopped but saved what i tried. open questions:
How do we make this importable by others as just types on window?
Should we have window.ai (the extension) export the types in
public-interface.ts
somehow, and people just depend on the extension but it only exports those types? If not, any way to keep it in sync with the extension, or fine to manually update this?If not, should the types library export a declaration file or a types file? (Seems like the former so far.)
What should the monorepo packages be named?
How do we patch the
global
window namespace? Doesn't seem to work from within an imported monorepo package