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.

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