I setup global namespaces for my objects by explicitly setting a property on window.
window
window.MyNamespace = window.MyNamespace || {};
Create a file called global.d.ts e.g /src/@types/global.d.ts then define an interface like:
global.d.ts
/src/@types/global.d.ts
interface Window { myLib: any }
ref: https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-d-ts.html