@@ -183,6 +183,10 @@ public static function getInput(): ValuesInterface
183183 * You can see more information about the capabilities of the child
184184 * asynchronous task in {@see CancellationScopeInterface} interface.
185185 *
186+ * @template TReturn
187+ * @param callable(): (TReturn|\Generator<mixed, mixed, mixed, TReturn>) $task
188+ * @return CancellationScopeInterface<TReturn>
189+ *
186190 * @throws OutOfContextException in the absence of the workflow execution context.
187191 */
188192 public static function async (callable $ task ): CancellationScopeInterface
@@ -231,6 +235,10 @@ public static function async(callable $task): CancellationScopeInterface
231235 *
232236 * Use asyncDetached to handle cleanup and compensation logic.
233237 *
238+ * @template TReturn
239+ * @param callable(): (TReturn|\Generator<mixed, mixed, mixed, TReturn>) $task
240+ * @return CancellationScopeInterface<TReturn>
241+ *
234242 * @throws OutOfContextException in the absence of the workflow execution context.
235243 */
236244 public static function asyncDetached (callable $ task ): CancellationScopeInterface
@@ -315,10 +323,9 @@ public static function awaitWithTimeout($interval, callable|Mutex|PromiseInterfa
315323 * Returns value of last completion result, if any.
316324 *
317325 * @param Type|TypeEnum|mixed $type
318- * @return mixed
319326 * @throws OutOfContextException in the absence of the workflow execution context.
320327 */
321- public static function getLastCompletionResult ($ type = null )
328+ public static function getLastCompletionResult ($ type = null ): mixed
322329 {
323330 return self ::getCurrentContext ()->getLastCompletionResult ($ type );
324331 }
@@ -685,7 +692,10 @@ public static function newContinueAsNewStub(string $class, ?ContinueAsNewOptions
685692 * }
686693 * ```
687694 *
695+ * @param non-empty-string $type
696+ * @param list<mixed> $args
688697 * @param Type|string|\ReflectionType|\ReflectionClass|null $returnType
698+ * @return PromiseInterface<mixed>
689699 *
690700 * @throws OutOfContextException in the absence of the workflow execution context.
691701 */
@@ -879,6 +889,7 @@ public static function newUntypedExternalWorkflowStub(WorkflowExecution $executi
879889 * }
880890 * ```
881891 *
892+ * @param non-empty-string $type
882893 * @param ActivityOptions|null $options
883894 * @return PromiseInterface<mixed>
884895 * @throws OutOfContextException in the absence of the workflow execution context.
0 commit comments