You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
3.1 KiB

  1. import type {
  2. ComponentRenderProxy,
  3. VNode,
  4. ComponentPublicInstance,
  5. FunctionalComponent,
  6. PropType as VuePropType
  7. } from "vue";
  8. // GlobalComponents for Volar
  9. declare module "vue" {
  10. export interface GlobalComponents {
  11. IconifyIconOffline: typeof import("../src/components/ReIcon")["IconifyIconOffline"];
  12. IconifyIconOnline: typeof import("../src/components/ReIcon")["IconifyIconOnline"];
  13. FontIcon: typeof import("../src/components/ReIcon")["FontIcon"];
  14. }
  15. }
  16. declare global {
  17. interface Window {
  18. // Global vue app instance
  19. __APP__: App<Element>;
  20. webkitCancelAnimationFrame: (handle: number) => void;
  21. mozCancelAnimationFrame: (handle: number) => void;
  22. oCancelAnimationFrame: (handle: number) => void;
  23. msCancelAnimationFrame: (handle: number) => void;
  24. webkitRequestAnimationFrame: (callback: FrameRequestCallback) => number;
  25. mozRequestAnimationFrame: (callback: FrameRequestCallback) => number;
  26. oRequestAnimationFrame: (callback: FrameRequestCallback) => number;
  27. msRequestAnimationFrame: (callback: FrameRequestCallback) => number;
  28. }
  29. // vue
  30. type PropType<T> = VuePropType<T>;
  31. type Writable<T> = {
  32. -readonly [P in keyof T]: T[P];
  33. };
  34. type Nullable<T> = T | null;
  35. type NonNullable<T> = T extends null | undefined ? never : T;
  36. type Recordable<T = any> = Record<string, T>;
  37. type ReadonlyRecordable<T = any> = {
  38. readonly [key: string]: T;
  39. };
  40. type Indexable<T = any> = {
  41. [key: string]: T;
  42. };
  43. type DeepPartial<T> = {
  44. [P in keyof T]?: DeepPartial<T[P]>;
  45. };
  46. type TimeoutHandle = ReturnType<typeof setTimeout>;
  47. type IntervalHandle = ReturnType<typeof setInterval>;
  48. interface ChangeEvent extends Event {
  49. target: HTMLInputElement;
  50. }
  51. interface WheelEvent {
  52. path?: EventTarget[];
  53. }
  54. interface ImportMetaEnv extends ViteEnv {
  55. __: unknown;
  56. }
  57. declare interface ViteEnv {
  58. VITE_PORT: number;
  59. VITE_PUBLIC_PATH: string;
  60. VITE_PROXY_DOMAIN: string;
  61. VITE_PROXY_DOMAIN_REAL: string;
  62. VITE_ROUTER_HISTORY: string;
  63. VITE_LEGACY: boolean;
  64. }
  65. declare interface ServerConfigs {
  66. Version?: string;
  67. Title?: string;
  68. FixedHeader?: boolean;
  69. HiddenSideBar?: boolean;
  70. MultiTagsCache?: boolean;
  71. KeepAlive?: boolean;
  72. Locale?: string;
  73. Layout?: string;
  74. Theme?: string;
  75. DarkMode?: boolean;
  76. Grey?: boolean;
  77. Weak?: boolean;
  78. HideTabs?: boolean;
  79. SidebarStatus?: boolean;
  80. EpThemeColor?: string;
  81. ShowLogo?: boolean;
  82. ShowModel?: string;
  83. MapConfigure?: {
  84. amapKey?: string;
  85. options: {
  86. resizeEnable?: boolean;
  87. center?: number[];
  88. zoom?: number;
  89. };
  90. };
  91. }
  92. function parseInt(s: string | number, radix?: number): number;
  93. function parseFloat(string: string | number): number;
  94. namespace JSX {
  95. // tslint:disable no-empty-interface
  96. type Element = VNode;
  97. // tslint:disable no-empty-interface
  98. type ElementClass = ComponentRenderProxy;
  99. interface ElementAttributesProperty {
  100. $props: any;
  101. }
  102. interface IntrinsicElements {
  103. [elem: string]: any;
  104. }
  105. interface IntrinsicAttributes {
  106. [elem: string]: any;
  107. }
  108. }
  109. }