@@ -6,9 +6,14 @@ This file was generated by Spark. Do not edit it by hand.
66Spark DSL extension for defining typed Phoenix channel event subscriptions.
77
88Declares which Ash PubSub publications a channel intercepts. For each declared
9- event, AshTypescript reads the publication's ` returns ` Ash.Type and generates
10- a typed TypeScript payload type. An event map and typed subscription helper
11- are also generated for the channel.
9+ event, AshTypescript reads the publication's ` returns ` type and generates a
10+ typed TypeScript payload type. An event map and typed subscription helper are
11+ also generated for the channel.
12+
13+ The recommended way to get typed payloads is to use ` transform :some_calc ` on
14+ publications, pointing to a resource calculation with ` :auto ` typing. Ash
15+ auto-derives the ` returns ` type from the calculation expression. You can also
16+ use explicit ` returns: ` with an anonymous function transform.
1217
1318## Usage
1419
@@ -86,8 +91,9 @@ publish event
8691Declare a PubSub event to intercept on this channel.
8792
8893The event name must match the ` event ` option (or action name fallback) of
89- a publication on the resource. The publication must have ` returns ` set for
90- TypeScript type generation.
94+ a publication on the resource. The publication must have a ` returns ` type
95+ for TypeScript type generation — either auto-derived via ` transform :calc `
96+ or explicitly set via ` returns: ` .
9197
9298
9399
0 commit comments