From 73057ebc6588bf712330135945b53a77cc505ae5 Mon Sep 17 00:00:00 2001 From: Rai Butera Date: Thu, 12 Mar 2026 10:55:54 +0000 Subject: [PATCH] fix: widen RESERVED_CHANNEL_IDS to Set to fix TS2345 TypeScript infers Set<'inter_session' | 'webchat'> from the literal values, making .has(string) a type error. Explicit Set annotation fixes CI typecheck without changing runtime behaviour. --- src/utils/message-channel.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/message-channel.ts b/src/utils/message-channel.ts index 90dcf042ebe..da11cb43064 100644 --- a/src/utils/message-channel.ts +++ b/src/utils/message-channel.ts @@ -33,7 +33,10 @@ export type InterSessionChannel = typeof INTER_SESSION_CHANNEL; * Checked in both plugin install (validatePluginId) and runtime channel * registration (registerChannel) to cover all registration paths. */ -export const RESERVED_CHANNEL_IDS = new Set([INTER_SESSION_CHANNEL, INTERNAL_MESSAGE_CHANNEL]); +export const RESERVED_CHANNEL_IDS: Set = new Set([ + INTER_SESSION_CHANNEL, + INTERNAL_MESSAGE_CHANNEL, +]); export function isInterSessionChannel(raw?: string | null): boolean { // Guard against collision with real deliverable plugin channels: a plugin