Browse Source

更新ts配置

Caner 3 years ago
parent
commit
b1c2187f50
2 changed files with 8 additions and 2 deletions
  1. 1 1
      src/vite-env.d.ts
  2. 7 1
      tsconfig.json

+ 1 - 1
src/vite-env.d.ts

@@ -6,7 +6,7 @@ declare type Any = any
 
 
 declare module '*.vue' {
 declare module '*.vue' {
   import type { DefineComponent } from 'vue'
   import type { DefineComponent } from 'vue'
-  const component: DefineComponent<{}, {}, any>
+  const component: DefineComponent<{}, {}, Any>
   export default component
   export default component
 }
 }
 
 

+ 7 - 1
tsconfig.json

@@ -15,7 +15,13 @@
       "ESNext",
       "ESNext",
       "DOM"
       "DOM"
     ],
     ],
-    "skipLibCheck": true
+    "skipLibCheck": true,
+    "baseUrl": "./",
+    "paths": {
+      "@/*": [
+        "src/*"
+      ]
+    },
   },
   },
   "include": [
   "include": [
     "src/**/*.ts",
     "src/**/*.ts",