File tree 3 files changed +15
-4
lines changed
3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ Workspace projects don't support all configuration properties. For better type s
96
96
97
97
::: code-group
98
98
``` ts [packages/a/vitest.config.ts] twoslash
99
+ // @errors: 2769
99
100
import { defineProject } from ' vitest/config'
100
101
101
102
export default defineProject ({
Original file line number Diff line number Diff line change 1
1
[build ]
2
2
publish = " docs/.vitepress/dist"
3
3
command = " pnpm ci:docs"
4
- ignore = " git diff --quiet $COMMIT_REF $ CACHED_COMMIT_REF -- docs/ package.json pnpm-lock.yaml"
4
+ ignore = " git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF docs/ package.json pnpm-lock.yaml"
5
5
6
6
[build .environment ]
7
7
NODE_VERSION = " 20"
Original file line number Diff line number Diff line change @@ -48,12 +48,22 @@ export function defineConfig(config: UserConfigExport): UserConfigExport {
48
48
return config
49
49
}
50
50
51
- export function defineProject < T extends UserProjectConfigExport > ( config : T ) : T {
51
+ export function defineProject ( config : UserWorkspaceConfig ) : UserWorkspaceConfig
52
+ export function defineProject ( config : Promise < UserWorkspaceConfig > ) : Promise < UserWorkspaceConfig >
53
+ export function defineProject ( config : UserProjectConfigFn ) : UserProjectConfigFn
54
+ export function defineProject ( config : UserProjectConfigExport ) : UserProjectConfigExport
55
+ export function defineProject ( config : UserProjectConfigExport ) : UserProjectConfigExport {
52
56
return config
53
57
}
54
58
55
- type Workspace = string | ( UserProjectConfigExport & { extends ?: string } )
59
+ type WorkspaceProjectConfiguration = string | ( UserProjectConfigExport & {
60
+ /**
61
+ * Relative path to the extendable config. All other options will be merged with this config.
62
+ * @example '../vite.config.ts'
63
+ */
64
+ extends ?: string
65
+ } )
56
66
57
- export function defineWorkspace ( config : Workspace [ ] ) : Workspace [ ] {
67
+ export function defineWorkspace ( config : WorkspaceProjectConfiguration [ ] ) : WorkspaceProjectConfiguration [ ] {
58
68
return config
59
69
}
You can’t perform that action at this time.
0 commit comments