🚨 尝试修复 qodana 报错

This commit is contained in:
目棃
2024-12-13 16:37:05 +08:00
parent 3ed6d503d4
commit 1b817cff5e
6 changed files with 173 additions and 143 deletions

View File

@@ -27,30 +27,12 @@ import { getDS4JS } from "@/web/utils/getRequestHeader.js";
type InvokeArg = { func: string };
class Client {
/**
* @private 监听实例
* @since Beta v0.3.3
* @type {EventEmitter}
*/
private listener: UnlistenFn | undefined;
/**
* @private 模拟路由
* @since Beta v0.3.4
* @type {string[]}
*/
private route: string[] = [];
/**
* @constructor
* @since Beta v0.3.4
* @description 构造函数
*/
private constructor() {
this.route = [];
this.listener = undefined;
}
private static instance: Client | null = null;
static getInstance(): Client {

28
src/vite-env.d.ts vendored
View File

@@ -28,25 +28,13 @@ declare module "vue-json-viewer" {
export default component;
}
/**
* @description import.meta.env
* @package vite
* @description 只写了用到的属性
*/
interface ImportMetaEnv {
TAURI_ARCH: string;
TAURI_DEBUG: boolean;
TAURI_FAMILY: string;
TAURI_KEY_PASSWORD: string;
TAURI_PLATFORM: string;
TAURI_PLATFORM_TYPE: string;
BASE_URL: string;
MODE: string;
DEV: boolean;
PROD: boolean;
SSR: boolean;
}
declare type ImportMeta = { readonly env: { MODE: string } };
declare interface ImportMeta {
readonly env: ImportMetaEnv;
declare interface TauriProcessEnv extends NodeJS.ProcessEnv {
TAURI_ARCH?: string;
TAURI_DEBUG?: boolean;
TAURI_FAMILY?: string;
TAURI_KEY_PASSWORD?: string;
TAURI_PLATFORM?: string;
TAURI_PLATFORM_TYPE?: string;
}