1
0
Fork 0

Allow passing non-async function to group

pull/1855/head
Benedek Kozma 2024-10-16 17:11:39 +02:00
parent 29d342f176
commit 5fc21de45e
1 changed files with 1 additions and 1 deletions

View File

@ -324,7 +324,7 @@ export function endGroup(): void {
* @param name The name of 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)
let result: T