fix: widen RESERVED_CHANNEL_IDS to Set<string> to fix TS2345

TypeScript infers Set<'inter_session' | 'webchat'> from the literal
values, making .has(string) a type error. Explicit Set<string>
annotation fixes CI typecheck without changing runtime behaviour.
This commit is contained in:
Rai Butera 2026-03-12 10:55:54 +00:00
parent 6698c1af84
commit 73057ebc65
1 changed files with 4 additions and 1 deletions

View File

@ -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<string> = 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