Closed msujew closed 2 years ago
@msujew Yes, you are right it also what the docu comment says:
A webview must be identified either with an ID (
webviewId
) or a type (webviewType
).
I like your proposal!
Changed as proposed. Also added isWebviewIdMessageParticipant
to check the WebviewMessageParticipant
type
Thanks @msujew !
Currently, using the
WebviewMessageParticipant
instead leads into a non-obvious pitfall:https://github.com/TypeFox/vscode-messenger/blob/f8746a5717931a900309729d356dc239194354a5/packages/vscode-messenger-common/src/messages.ts#L26-L32
As both
webviewId
andwebviewType
are optional, I believed them both to be truly optional. However, at least one of them is needed. This fact is not reflected in the type definition. Instead, the type should probably look something like this: