As showcased by the asserted types - this was incorrect. More importantly though, this has resulted in a broken behavior because I was not able to send a message to devtools from a window. After my message got broken by this assignment the background script was not able to route this message because it was being discarded by this check:
https://github.com/antfu/webext-bridge/blob/9ab5a9d50ea50fb6d509750e0e554755f705735c/src/internal.ts#L95
As showcased by the asserted types - this was incorrect. More importantly though, this has resulted in a broken behavior because I was not able to send a message to devtools from a window. After my message got broken by this assignment the background script was not able to route this message because it was being discarded by this check: https://github.com/antfu/webext-bridge/blob/9ab5a9d50ea50fb6d509750e0e554755f705735c/src/internal.ts#L95