mirror of https://github.com/openclaw/openclaw.git
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:
parent
6698c1af84
commit
73057ebc65
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue