Skip to content

Commit 7c32a1d

Browse files
committed
fix: overload defineConfig
revert #381 & daaac8d
1 parent d0248b3 commit 7c32a1d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ import type { UserConfig, UserConfigFn } from './options'
33
/**
44
* Defines the configuration for tsdown.
55
*/
6-
export function defineConfig<const T extends UserConfig | UserConfigFn>(
7-
options: T,
8-
): T {
6+
export function defineConfig(options: UserConfig): UserConfig
7+
export function defineConfig(options: UserConfigFn): UserConfigFn
8+
export function defineConfig(
9+
options: UserConfig | UserConfigFn,
10+
): UserConfig | UserConfigFn {
911
return options
1012
}
1113

0 commit comments

Comments
 (0)