error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations.
Broken Code ❌
You have to turn your code into a module by adding an
export statement to your code. The easiest way to solve the problem is exporting an empty object:
Fixed Code ✔️