Skip to content

Commit a0d4a2d

Browse files
committed
feat: add quansync options for macro
1 parent f3eda8e commit a0d4a2d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/macro.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { QuansyncFn, QuansyncInput } from './types'
1+
import type { QuansyncFn, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions } from './types'
22
import { quansync as _quansync } from './index'
33

44
export type * from './types'
@@ -13,6 +13,12 @@ export type * from './types'
1313
* @internal
1414
*/
1515
export const quansync = _quansync as
16+
{
1617
<Return, Args extends any[] = []>(
17-
options: QuansyncInput<Return, Args> | ((...args: Args) => Promise<Return> | Return),
18-
) => QuansyncFn<Return, Args>
18+
input: QuansyncInputObject<Return, Args>,
19+
): QuansyncFn<Return, Args>
20+
<Return, Args extends any[] = []>(
21+
input: QuansyncGeneratorFn<Return, Args> | Promise<Return> | ((...args: Args) => Promise<Return> | Return),
22+
options?: QuansyncOptions,
23+
): QuansyncFn<Return, Args>
24+
}

0 commit comments

Comments
 (0)