clddup
2024-07-19 baf406e7e271ac90faa3aec31ceb44715331d9d0
types/global.d.ts
@@ -1,13 +1,14 @@
import type {
  ComponentRenderProxy,
  VNode,
  VNodeChild,
  ComponentPublicInstance,
  FunctionalComponent,
  PropType as VuePropType,
} from 'vue';
declare global {
  declare interface __APP_INFO__ {
  const __APP_INFO__: {
    pkg: {
      name: string;
      version: string;
@@ -15,14 +16,22 @@
      devDependencies: Recordable<string>;
    };
    lastBuildTime: string;
  }
  declare interface Window {
    // Global vue app instance
    __APP__: App<Element>;
  };
  // declare interface Window {
  //   // Global vue app instance
  //   __APP__: App<Element>;
  // }
  // fix FullScreen type error
  interface Document {
    mozFullScreenElement?: Element;
    msFullscreenElement?: Element;
    webkitFullscreenElement?: Element;
  }
  // vue
  declare type PropType<T> = VuePropType<T>;
  declare type VueNode = VNodeChild | JSX.Element;
  export type Writable<T> = {
    -readonly [P in keyof T]: T[P];
@@ -55,19 +64,10 @@
  }
  declare interface ViteEnv {
    VITE_PORT: number;
    VITE_USE_MOCK: boolean;
    VITE_USE_PWA: boolean;
    VITE_PUBLIC_PATH: string;
    VITE_PROXY: [string, string][];
    VITE_GLOB_APP_TITLE: string;
    VITE_GLOB_APP_SHORT_NAME: string;
    VITE_USE_CDN: boolean;
    VITE_DROP_CONSOLE: boolean;
    VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none';
    VITE_LEGACY: boolean;
    VITE_USE_IMAGEMIN: boolean;
    VITE_GENERATE_UI: string;
  }
  declare function parseInt(s: string | number, radix?: number): number;