If you export a binding from the global scope, you're supposed to get an error unless you create a local binding and export it with whatever name you want.
export { Math };
// ~~~~
// Cannot export 'Math'. Only local declarations can be exported from a module.
However, we have a hole and allow exports that originate from a global augmentation. The following file is permitted with no error:
declare global {
var XYZ: number;
}
export { XYZ };
Playground Link
If you export a binding from the global scope, you're supposed to get an error unless you create a local binding and export it with whatever name you want.
However, we have a hole and allow exports that originate from a global augmentation. The following file is permitted with no error:
Playground Link