晓晓晓晓丶vv преди 4 години
родител
ревизия
e61832dcb0
променени са 3 файла, в които са добавени 11 реда и са изтрити 20 реда
  1. 4 1
      src/global.d.ts
  2. 3 4
      src/store/modules/app/index.ts
  3. 4 15
      tsconfig.json

+ 4 - 1
src/global.d.ts

@@ -3,7 +3,10 @@ import { ComponentCustomProperties } from "vue";
 
 declare module "@vue/runtime-core" {
   interface ComponentCustomProperties {
-    $copyText(text: string, container?: HTMLElement): Promise<Clipboard.Event>;
+    $copyText(
+      text: string,
+      container?: HTMLElement
+    ): Promise<ClipboardJS.Event>;
     $confirm(options: ModalFuncProps): ModalFunc;
   }
 }

+ 3 - 4
src/store/modules/app/index.ts

@@ -4,8 +4,8 @@ import mutations from "./mutations";
 import actions from "./actions";
 import getters from "./getters";
 
-import { State as _State } from "./_type";
-import { Store } from "./_module";
+import type { State } from "./_type";
+import type { Store } from "./_module";
 
 import { RootState } from "@/store";
 
@@ -17,7 +17,6 @@ const appModule: Module<State, RootState> = {
   actions,
 };
 
-export type State = _State;
-export { Store };
+export { State, Store };
 
 export default appModule;

+ 4 - 15
tsconfig.json

@@ -11,20 +11,11 @@
     "allowSyntheticDefaultImports": true,
     "sourceMap": true,
     "baseUrl": ".",
-    "types": [
-      "webpack-env"
-    ],
+    "types": ["webpack-env"],
     "paths": {
-      "@/*": [
-        "src/*"
-      ]
+      "@/*": ["src/*"]
     },
-    "lib": [
-      "esnext",
-      "dom",
-      "dom.iterable",
-      "scripthost"
-    ]
+    "lib": ["esnext", "dom", "dom.iterable", "scripthost"]
   },
   "include": [
     "src/**/*.ts",
@@ -33,7 +24,5 @@
     "tests/**/*.ts",
     "tests/**/*.tsx"
   ],
-  "exclude": [
-    "node_modules"
-  ]
+  "exclude": ["node_modules"]
 }