Declaring a namespace is unnecessary if that is the module's only content; just use ES6 export syntax instead.
Bad:
namespace MyLib {
export function f(): number;
}
export = MyLib;
Good:
export function f(): number;
Also good:
namespace MyLib {
export function f(): number;
}
function MyLib(): number;
export = MyLib;