Skip to content

Commit

Permalink
fix: add config.d.ts && change defineConfig function type (#830)
Browse files Browse the repository at this point in the history
* fix: add config.d.ts && change defineConfig function type

* chore: update

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
TrickyPi and antfu committed Feb 22, 2022
1 parent 82b5c19 commit ac9c428
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/vitest/config.d.ts
@@ -0,0 +1 @@
export * from './dist/config'
2 changes: 1 addition & 1 deletion packages/vitest/package.json
Expand Up @@ -39,7 +39,7 @@
"./config": {
"import": "./dist/config.js",
"require": "./dist/config.cjs",
"types": "./dist/config.d.ts"
"types": "./config.d.ts"
}
},
"main": "./dist/index.js",
Expand Down
8 changes: 7 additions & 1 deletion packages/vitest/src/config.ts
@@ -1,6 +1,12 @@
import type { UserConfig } from 'vite'
import type { UserConfig as ViteUserConfig } from 'vite'
import type { InlineConfig } from './types'

export interface UserConfig extends ViteUserConfig {
test?: InlineConfig
}

export { configDefaults } from './defaults'

export function defineConfig(config: UserConfig) {
return config
}

0 comments on commit ac9c428

Please sign in to comment.