本页还没有译文
本页 8 段还没译成Tiếng Việt,下面显示的是英文原文。WorkflowCtx
还没翻译译自英文(tanstack.com)本页 8 段都还没译
Type Alias: WorkflowCtx<TExtensions>
type WorkflowCtx<TExtensions> = Ctx<any, any, TExtensions>;Defined in: packages/workflow-core/src/types.ts:380
Helper alias for typing functions that only care about middleware extensions — not the calling workflow's specific input / state shape. Common in shared utility helpers:
async function chargeUser(
ctx: WorkflowCtx<{ user: User }>,
amount: number,
) {
return ctx.step('charge', () => stripe.charge(amount, ctx.user.id))
}
For helpers that need typed ctx.input or ctx.state, use the
full Ctx<TInput, TState, TExt> directly.
Type Parameters
TExtensions
TExtensions = unknown
AI 翻译查看英文原文