fix: workflow 'when' should return T or undefined instead of Partial<T> (#8195)
* fix: workflow 'when' should return T or undefined instead of Partial<T> * fix when usage
This commit is contained in:
1 parent
78b8a3c60f
commit
35c3759ed8
3 files changed
+7
-7
No files matched your search
@@ -13,7 +13,7 @@ type ConditionFunction<T extends object | WorkflowData> = (
|
||||
type ThenFunc = <ThenResolver extends () => any>(
|
||||
resolver: ThenResolver
|
||||
) => ReturnType<ThenResolver> extends WorkflowData<infer ReturnedWorkflowData>
|
||||
? Partial<WorkflowData<ReturnedWorkflowData>>
|
||||
? WorkflowData<ReturnedWorkflowData> | undefined
|
||||
: ReturnType<ThenResolver>
|
||||
|
||||
export function when<T extends object | WorkflowData, Then extends Function>(
|
||||
|
||||
Reference in new issue
Block a user