mirror of https://github.com/vuejs/vitepress
- split __tests__/tsconfig.json into per-suite projects so unit tests check against src (via path aliases) while e2e/init check against the built package, avoiding mixing both type universes in one program - explicitly include the .vitepress dir in the e2e project - dotted directories are skipped by default, so it was never type-checked - add a `*.vue` shim for the e2e custom theme (named env.d.ts because a shims.d.ts would be dropped in favor of the adjacent shims.ts) - add a tsconfig for docs, checked with vue-tsc - wire everything into `pnpm test` as `test:types` Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>pull/5335/head
parent
572bc63bd8
commit
6bbd04e0bf
@ -0,0 +1,5 @@
|
|||||||
|
declare module '*.vue' {
|
||||||
|
import type { DefineComponent } from 'vue'
|
||||||
|
const component: DefineComponent
|
||||||
|
export default component
|
||||||
|
}
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"extends": "../tsconfig.json",
|
||||||
|
"include": ["**/*", ".vitepress/**/*"]
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": "../tsconfig.json"
|
||||||
|
}
|
||||||
@ -1,12 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": "../tsconfig.json",
|
"extends": "../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"noEmit": true,
|
||||||
"isolatedModules": false,
|
"isolatedModules": false,
|
||||||
"types": ["node", "vitest/globals"],
|
"types": ["node", "vitest/globals"]
|
||||||
"paths": {
|
|
||||||
"client/*": ["../src/client/*"],
|
|
||||||
"node/*": ["../src/node/*"],
|
|
||||||
"shared/*": ["../src/shared/*"]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"extends": "../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"types": [
|
||||||
|
"node",
|
||||||
|
"vitest/globals",
|
||||||
|
"vite/client",
|
||||||
|
"../../src/client/shims.d.ts"
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"client/*": ["../../src/client/*"],
|
||||||
|
"node/*": ["../../src/node/*"],
|
||||||
|
"shared/*": ["../../src/shared/*"],
|
||||||
|
"vitepress": ["../../src/client/index.ts"],
|
||||||
|
"vitepress/theme": ["../../theme.d.ts"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"extends": "../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"noEmit": true,
|
||||||
|
"types": ["node"]
|
||||||
|
},
|
||||||
|
"include": ["**/*", ".vitepress/**/*"]
|
||||||
|
}
|
||||||
Loading…
Reference in new issue