defineExtensionMessaging should be marked with `this: void`
Basically the same idea as with https://typescript-eslint.io/rules/unbound-method/ so tooling knows destructoring is safe here.
https://github.com/aklinker1/webext-core/blob/ce0ad0d78de9feff2c91a239cd42294d989e6819/packages/messaging/src/extension.ts#L49-L51
function defineExtensionMessaging(this: void, condig: Config)
Just being a static function already means that it's this is void. The lint rule you linked to only mentions bound functions and changing the this context, but that doesn't apply to non-class functions. And it doesn't mention anything about making destructuing safe... Am I misunderstanding what you're asking for?
Currently that lint rule fails for me, hence this issue report.
I think I was bit wrong this should not be declared on defineExtensionMessaging but on sendMessage instead https://github.com/aklinker1/webext-core/blob/ce0ad0d78de9feff2c91a239cd42294d989e6819/packages/messaging/src/generic.ts#L40-L59
Not 100% sure but interface/class when used as a type behaves almost the same, so when it sees GenericMessenger interface which you try destructoring from it thinks this could belong to GenericMessenger and not be void
Yeah ok, that makes more sense. If you want to open a PR, that'd be great