请问3.0.1里面如何定义使用全局变量不会在vscode里报错呢?

我使用这种方式定义
globalThis.ww = {a:123};
可以使用,但是定义的地方vscode里一直提示错误
“Element implicitly has an ‘any’ type because type ‘typeof globalThis’ has no index signature.ts(7017)”
使用的地方vscode提示错误
“Cannot find name ‘ww’.ts(2304)”
看着很难受啊,莫非必须使用单例?

我是用any转一下用的

定义 d.ts