From eedd7f33024c4a9885f6d6dd6e71a51b327ed21b Mon Sep 17 00:00:00 2001 From: extclp <2842417407@qq.com> Date: Mon, 22 Apr 2024 10:00:03 +0800 Subject: [PATCH] chore: remove json file type declare (#7514) --- loader.js | 13 ------------ site/typings/index.d.ts | 5 ----- tsconfig.json | 3 ++- typings/custom-typings.d.ts | 5 ----- typings/index.d.ts | 2 -- typings/vue-tsx-shim.d.ts | 42 ------------------------------------- 6 files changed, 2 insertions(+), 68 deletions(-) delete mode 100644 loader.js delete mode 100644 site/typings/index.d.ts delete mode 100644 typings/custom-typings.d.ts delete mode 100644 typings/index.d.ts delete mode 100644 typings/vue-tsx-shim.d.ts diff --git a/loader.js b/loader.js deleted file mode 100644 index fbea66132..000000000 --- a/loader.js +++ /dev/null @@ -1,13 +0,0 @@ -function loader() { - return ` - - `; -} - -module.exports = loader; diff --git a/site/typings/index.d.ts b/site/typings/index.d.ts deleted file mode 100644 index 7592af772..000000000 --- a/site/typings/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module '*.json' { - const value: any; - export const version: string; - export default value; -} diff --git a/tsconfig.json b/tsconfig.json index d9d72d66c..a5e9660f3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,7 +22,8 @@ "skipLibCheck": true, "allowJs": true, "importsNotUsedAsValues": "preserve", - "stripInternal": true + "stripInternal": true, + "resolveJsonModule": true }, "exclude": [ "node_modules", diff --git a/typings/custom-typings.d.ts b/typings/custom-typings.d.ts deleted file mode 100644 index 7592af772..000000000 --- a/typings/custom-typings.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module '*.json' { - const value: any; - export const version: string; - export default value; -} diff --git a/typings/index.d.ts b/typings/index.d.ts deleted file mode 100644 index a56d9a612..000000000 --- a/typings/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/triple-slash-reference -/// diff --git a/typings/vue-tsx-shim.d.ts b/typings/vue-tsx-shim.d.ts deleted file mode 100644 index 573b6c144..000000000 --- a/typings/vue-tsx-shim.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import 'vue'; - -type EventHandler = (...args: any[]) => void; - -declare module 'vue' { - interface ComponentCustomProps { - role?: string; - tabindex?: number | string; - // should be removed after Vue supported component events typing - // see: https://github.com/vuejs/vue-next/issues/1553 - // https://github.com/vuejs/vue-next/issues/3029 - // onBlur?: EventHandler; - // onOpen?: EventHandler; - // onEdit?: EventHandler; - // onLoad?: EventHandler; - // onClose?: EventHandler; - // onFocus?: EventHandler; - // onInput?: EventHandler; - // onClick?: EventHandler; - // onPress?: EventHandler; - // onCancel?: EventHandler; - // onChange?: EventHandler; - // onDelete?: EventHandler; - // onScroll?: EventHandler; - // onSubmit?: EventHandler; - // onSelect?: EventHandler; - // onConfirm?: EventHandler; - // onPreview?: EventHandler; - // onKeypress?: EventHandler; - // onTouchend?: EventHandler; - // onTouchmove?: EventHandler; - // onTouchstart?: EventHandler; - // onTouchcancel?: EventHandler; - // onMouseenter?: EventHandler; - // onMouseleave?: EventHandler; - // onMousemove?: EventHandler; - // onKeydown?: EventHandler; - // onKeyup?: EventHandler; - // onDeselect?: EventHandler; - // onClear?: EventHandler; - } -}