Skip to content

Type Alias: ActionHandler<M, K> ​

ts
type ActionHandler<M, K> = M["actions"][K] extends ActionSpec<infer I, infer O> ? 
  | ((input, ctx) => z.input<O> | PendingResult)
  | ((input, ctx) => Promise<z.input<O> | PendingResult>) : never;

Type Parameters ​

M ​

M extends AppManifestSpec

K ​

K extends keyof M["actions"]

Released under the Apache-2.0 License.