I setup global namespaces for my objects by explicitly setting a property on window.
window.MyNamespace = window.MyNamespace || {};
First you need to declare the window object in current scope.
Because typescript would like to know the type of the object.
Since window object is defined somewhere else you can not redefine it.
But you can declare it as follows:-
declare var window: any;
This will not redefine the window object or it will not create another variable with name window.
This means window is defined somewhere else and you are just referencing it in current scope.
Then you can refer to your MyNamespace object simply by:-
window.MyNamespace
Or you can set the new property on window object simply by:-
window.MyNamespace = MyObject
And now the typescript won't complain.