`window` 的 JSDoc 类型转换?

JSDoc type cast for `window`?

我很好奇我应该使用什么类型定义来将 window 传递给函数。通常我使用 HTMLElement,但我认为 window 不是 HTMLElement

谢谢!

typeof(window)returnsobject。如果您要定义它继承自的接口类型:

The window object implements the Window interface, which in turn inherits from the AbstractView interface.

https://developer.mozilla.org/en-US/docs/Web/API/Window