fix: accept other key,values in channelDataSchema

This commit is contained in:
abdou6666 2025-02-03 18:30:14 +01:00
parent ac01cc7269
commit a648fec828

View File

@ -20,8 +20,10 @@ export type SubscriberChannelData<C extends ChannelName = 'unknown-channel'> =
[P in keyof SubscriberChannelDict[C]]: SubscriberChannelDict[C][P];
};
export const channelDataSchema = z.object({
name: z.string().regex(/-channel$/) as z.ZodType<ChannelName>,
});
export const channelDataSchema = z
.object({
name: z.string().regex(/-channel$/) as z.ZodType<ChannelName>,
})
.passthrough();
export type Channel = z.infer<typeof channelDataSchema>;