更改dts存放路径

This commit is contained in:
Rewrite0
2023-06-01 09:00:21 +08:00
parent ca2ae7d784
commit 4e4668205e
6 changed files with 21 additions and 20 deletions

View File

@@ -24,7 +24,8 @@
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue",
"types/**/*.ts"
"types/*.ts",
"types/dts/*.d.ts"
],
"references": [{ "path": "./tsconfig.node.json" }]
}

View File

@@ -5,17 +5,17 @@ declare global {
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
const afterAll: typeof import('vitest')['afterAll']
const afterEach: typeof import('vitest')['afterEach']
const apiAuth: typeof import('./api/auth')['apiAuth']
const apiBangumi: typeof import('./api/bangumi')['apiBangumi']
const apiCheck: typeof import('./api/check')['apiCheck']
const apiConfig: typeof import('./api/config')['apiConfig']
const apiDownload: typeof import('./api/download')['apiDownload']
const apiLog: typeof import('./api/log')['apiLog']
const apiProgram: typeof import('./api/program')['apiProgram']
const apiAuth: typeof import('../../src/api/auth')['apiAuth']
const apiBangumi: typeof import('../../src/api/bangumi')['apiBangumi']
const apiCheck: typeof import('../../src/api/check')['apiCheck']
const apiConfig: typeof import('../../src/api/config')['apiConfig']
const apiDownload: typeof import('../../src/api/download')['apiDownload']
const apiLog: typeof import('../../src/api/log')['apiLog']
const apiProgram: typeof import('../../src/api/program')['apiProgram']
const assert: typeof import('vitest')['assert']
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
const axios: typeof import('./utils/axios')['axios']
const axios: typeof import('../../src/utils/axios')['axios']
const beforeAll: typeof import('vitest')['beforeAll']
const beforeEach: typeof import('vitest')['beforeEach']
const chai: typeof import('vitest')['chai']
@@ -134,12 +134,12 @@ declare global {
const unrefElement: typeof import('@vueuse/core')['unrefElement']
const until: typeof import('@vueuse/core')['until']
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
const useApi: typeof import('./hooks/useApi')['useApi']
const useApi: typeof import('../../src/hooks/useApi')['useApi']
const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue']
const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
const useAttrs: typeof import('vue')['useAttrs']
const useAuth: typeof import('./hooks/useAuth')['useAuth']
const useBangumiStore: typeof import('./store/bangumi')['useBangumiStore']
const useAuth: typeof import('../../src/hooks/useAuth')['useAuth']
const useBangumiStore: typeof import('../../src/store/bangumi')['useBangumiStore']
const useBase64: typeof import('@vueuse/core')['useBase64']
const useBattery: typeof import('@vueuse/core')['useBattery']
const useBluetooth: typeof import('@vueuse/core')['useBluetooth']
@@ -150,7 +150,7 @@ declare global {
const useClamp: typeof import('@vueuse/core')['useClamp']
const useClipboard: typeof import('@vueuse/core')['useClipboard']
const useColorMode: typeof import('@vueuse/core')['useColorMode']
const useConfigStore: typeof import('./store/config')['useConfigStore']
const useConfigStore: typeof import('../../src/store/config')['useConfigStore']
const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
const useCounter: typeof import('@vueuse/core')['useCounter']
const useCssModule: typeof import('vue')['useCssModule']
@@ -199,14 +199,14 @@ declare global {
const useKeyModifier: typeof import('@vueuse/core')['useKeyModifier']
const useLastChanged: typeof import('@vueuse/core')['useLastChanged']
const useLocalStorage: typeof import('@vueuse/core')['useLocalStorage']
const useLogStore: typeof import('./store/log')['useLogStore']
const useLogStore: typeof import('../../src/store/log')['useLogStore']
const useMagicKeys: typeof import('@vueuse/core')['useMagicKeys']
const useManualRefHistory: typeof import('@vueuse/core')['useManualRefHistory']
const useMediaControls: typeof import('@vueuse/core')['useMediaControls']
const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
const useMemoize: typeof import('@vueuse/core')['useMemoize']
const useMemory: typeof import('@vueuse/core')['useMemory']
const useMessage: typeof import('./hooks/useMessage')['useMessage']
const useMessage: typeof import('../../src/hooks/useMessage')['useMessage']
const useMounted: typeof import('@vueuse/core')['useMounted']
const useMouse: typeof import('@vueuse/core')['useMouse']
const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
@@ -221,13 +221,13 @@ declare global {
const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
const useParallax: typeof import('@vueuse/core')['useParallax']
const usePermission: typeof import('@vueuse/core')['usePermission']
const usePlayerStore: typeof import('./store/player')['usePlayerStore']
const usePlayerStore: typeof import('../../src/store/player')['usePlayerStore']
const usePointer: typeof import('@vueuse/core')['usePointer']
const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe']
const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme']
const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
const useProgramStore: typeof import('./store/program')['useProgramStore']
const useProgramStore: typeof import('../../src/store/program')['useProgramStore']
const useRafFn: typeof import('@vueuse/core')['useRafFn']
const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']

View File

@@ -12,7 +12,7 @@ export default defineConfig({
base: './',
plugins: [
VueRouter({
dts: 'src/router-type.d.ts',
dts: 'types/dts/router-type.d.ts',
}),
vue({
script: {
@@ -22,11 +22,11 @@ export default defineConfig({
UnoCSS(),
AutoImport({
imports: ['vue', 'vitest', 'pinia', '@vueuse/core', VueRouterAutoImports],
dts: 'src/auto-imports.d.ts',
dts: 'types/dts/auto-imports.d.ts',
dirs: ['src/api', 'src/store', 'src/hooks', 'src/utils'],
}),
Components({
dts: 'src/components.d.ts',
dts: 'types/dts/components.d.ts',
dirs: [
'src/components',
'src/components/basic',