TS1280
Namespaces are not allowed in global script files when
verbatimModuleSyntaxis enabled. If this file is not intended to be a global script, setmoduleDetectiontoforceor add an emptyexport {}statement.
Broken Code ❌
module global {
namespace globalThis {
var signin: () => string[];
}
}
this.signin();Fixed Code ✔️
Use a quotes around the name global and turn it into an ambient module by using the declare module syntax:
declare module 'global' {
namespace globalThis {
var signin: () => string[];
}
}
this.signin();