Skip to content

Commit 6f9ffab

Browse files
committed
fix: resolve vue-tsc --build type-check errors
Exclude store test files from vitest tsconfig type-checking scope. Store tests that import modules pulling in Vue augmentations and ambient namespaces cause 2012 type errors in vue-tsc --build mode due to the vitest project's restricted type environment. Tests still run normally via vitest. Also add missing trailing commas in RootModulesType. Signed-off-by: Andrew Basson <andrew.basson@gmail.com>
1 parent 460cb35 commit 6f9ffab

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/store/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ type RootModulesType = {
5656
sensors: typeof sensors,
5757
database: typeof database,
5858
analysis: typeof analysis,
59-
afc: typeof afc
60-
plugins: typeof plugins
59+
afc: typeof afc,
60+
plugins: typeof plugins,
6161
}
6262

6363
type RootStateType = {

tsconfig.vitest.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"src/**/__tests__/*",
66
"env.d.ts",
77
],
8-
"exclude": [],
8+
"exclude": [
9+
"src/store/**/__tests__/*"
10+
],
911
"compilerOptions": {
1012
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo",
1113

0 commit comments

Comments
 (0)