I have a native JS library statically imported (npm is not an option) that I've written types for. The library provides all of it's interface through a global var, so I want to do something along the lines of:
export declare namespace Foo {
// ... all my types, classes, consts, vars etc.
}
declare global {
const foo: Foo
}
no matter which variation I tried, I end up in typescript telling me that I cannot use a namespace as a type, and I cannot find a way to make it work as desired without using skipLibCheck: true which I believe is not a desired way to deal with an error
how do I design this properly?