mirror of https://github.com/actions/toolkit
Allow passing non-async function to group
parent
29d342f176
commit
5fc21de45e
|
@ -324,7 +324,7 @@ export function endGroup(): void {
|
||||||
* @param name The name of the group
|
* @param name The name of the group
|
||||||
* @param fn The function to wrap in the group
|
* @param fn The function to wrap in the group
|
||||||
*/
|
*/
|
||||||
export async function group<T>(name: string, fn: () => Promise<T>): Promise<T> {
|
export async function group<T>(name: string, fn: () => T | Promise<T>): Promise<T> {
|
||||||
startGroup(name)
|
startGroup(name)
|
||||||
|
|
||||||
let result: T
|
let result: T
|
||||||
|
|
Loading…
Reference in New Issue