feat(turbo-gen): templates for gen realtime channel

This commit is contained in:
2026-05-08 22:56:28 +02:00
parent 4032e5a722
commit a39f372710
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
// packages/{{kebabCase feature}}/src/realtime/{{kebabCase channelSlug}}.channel.ts
import { z } from "zod";
import { defineRealtimeChannel } from "@repo/core-realtime";
export const {{camelCase channelSlug}}Schema = z.object({}).strict();
export type {{pascalCase channelSlug}}Payload = z.infer<typeof {{camelCase channelSlug}}Schema>;
export const {{camelCase channelSlug}}Channel = defineRealtimeChannel(
"{{kebabCase feature}}.{{kebabCase channelSlug}}",
{{camelCase channelSlug}}Schema,
{ scope: {{{scopeLiteral}}} },
);