ny
22 小时以前 282fbc6488f4e8ceb5fda759f963ee88fbf7b999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import type { RouteMeta as IRouteMeta } from '@vben-core/typings';
 
import 'vue-router';
 
declare module 'vue-router' {
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
  interface RouteMeta extends IRouteMeta {}
}
 
export interface JnpfAdminProAppConfigRaw {
  VITE_GLOB_API_URL: string;
  VITE_GLOB_REPORT_API_URL: string;
  VITE_GLOB_WEBSOCKET_URL: string;
}
 
export interface ApplicationConfig {
  apiURL: string;
  reportApiURL: string;
  webSocketURL: string;
  isDevMode: () => boolean;
  isProdMode: () => boolean;
}
 
declare global {
  interface Window {
    _JNPF_ADMIN_PRO_APP_CONF_: JnpfAdminProAppConfigRaw;
  }
  namespace JSX {
    // tslint:disable no-empty-interface
    type Element = VNode;
    // tslint:disable no-empty-interface
    type ElementClass = ComponentRenderProxy;
    interface ElementAttributesProperty {
      $props: any;
    }
    interface IntrinsicElements {
      [elem: string]: any;
    }
    interface IntrinsicAttributes {
      [elem: string]: any;
    }
  }
  // vue
  declare type PropType<T> = VuePropType<T>;
  declare type VueNode = JSX.Element | VNodeChild;
 
  export type Writable<T> = {
    -readonly [P in keyof T]: T[P];
  };
 
  declare type Nullable<T> = null | T;
  declare type NonNullable<T> = T extends null | undefined ? never : T;
  declare type Recordable<T = any> = Record<string, T>;
  declare type ReadonlyRecordable<T = any> = {
    readonly [key: string]: T;
  };
  declare interface Fn<T = any, R = T> {
    (...arg: T[]): R;
  }
  declare type EmitType = (event: string, ...args: any[]) => void;
}
 
declare interface Fn<T = any, R = T> {
  (...arg: T[]): R;
}
 
declare interface PromiseFn<T = any, R = T> {
  (...arg: T[]): Promise<R>;
}
 
declare type RefType<T> = null | T;
 
declare type LabelValueOptions = {
  [key: string]: boolean | number | string;
  label: string;
  value: any;
}[];
 
declare type TargetContext = '_blank' | '_self';
 
declare interface ComponentElRef<T extends HTMLElement = HTMLDivElement> {
  $el: T;
}
 
declare type ComponentRef<T extends HTMLElement = HTMLDivElement> =
  ComponentElRef<T> | null;
 
declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>;