mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-12-09 14:40:27 +08:00
refactor: use setup refactor
This commit is contained in:
48
types/global.d.ts
vendored
48
types/global.d.ts
vendored
@@ -16,53 +16,53 @@ declare global {
|
||||
};
|
||||
lastBuildTime: string;
|
||||
};
|
||||
declare interface Window {
|
||||
interface Window {
|
||||
// Global vue app instance
|
||||
__APP__: App<Element>;
|
||||
webkitCancelAnimationFrame: (id?: any) => any;
|
||||
webkitRequestAnimationFrame: (id?: any) => any;
|
||||
mozCancelAnimationFrame: (id?: any) => any;
|
||||
oCancelAnimationFrame: (id?: any) => any;
|
||||
msCancelAnimationFrame: (id?: any) => any;
|
||||
mozRequestAnimationFrame: (id?: any) => any;
|
||||
oRequestAnimationFrame: (id?: any) => any;
|
||||
msRequestAnimationFrame: (id?: any) => any;
|
||||
webkitCancelAnimationFrame: (handle: number) => void;
|
||||
webkitRequestAnimationFrame: (callback: FrameRequestCallback) => number;
|
||||
mozCancelAnimationFrame: (id?: string) => any;
|
||||
oCancelAnimationFrame: (id?: string) => any;
|
||||
msCancelAnimationFrame: (id?: string) => any;
|
||||
mozRequestAnimationFrame: (id?: string) => any;
|
||||
oRequestAnimationFrame: (id?: string) => any;
|
||||
msRequestAnimationFrame: (id?: string) => any;
|
||||
}
|
||||
|
||||
// vue
|
||||
declare type PropType<T> = VuePropType<T>;
|
||||
type PropType<T> = VuePropType<T>;
|
||||
|
||||
export type Writable<T> = {
|
||||
type Writable<T> = {
|
||||
-readonly [P in keyof T]: T[P];
|
||||
};
|
||||
|
||||
declare type Nullable<T> = T | null;
|
||||
declare type NonNullable<T> = T extends null | undefined ? never : T;
|
||||
declare type Recordable<T = any> = Record<string, T>;
|
||||
declare type ReadonlyRecordable<T = any> = {
|
||||
type Nullable<T> = T | null;
|
||||
type NonNullable<T> = T extends null | undefined ? never : T;
|
||||
type Recordable<T = any> = Record<string, T>;
|
||||
type ReadonlyRecordable<T = any> = {
|
||||
readonly [key: string]: T;
|
||||
};
|
||||
declare type Indexable<T = any> = {
|
||||
type Indexable<T = any> = {
|
||||
[key: string]: T;
|
||||
};
|
||||
declare type DeepPartial<T> = {
|
||||
type DeepPartial<T> = {
|
||||
[P in keyof T]?: DeepPartial<T[P]>;
|
||||
};
|
||||
declare type TimeoutHandle = ReturnType<typeof setTimeout>;
|
||||
declare type IntervalHandle = ReturnType<typeof setInterval>;
|
||||
type TimeoutHandle = ReturnType<typeof setTimeout>;
|
||||
type IntervalHandle = ReturnType<typeof setInterval>;
|
||||
|
||||
declare interface ChangeEvent extends Event {
|
||||
interface ChangeEvent extends Event {
|
||||
target: HTMLInputElement;
|
||||
}
|
||||
|
||||
declare interface WheelEvent {
|
||||
interface WheelEvent {
|
||||
path?: EventTarget[];
|
||||
}
|
||||
interface ImportMetaEnv extends ViteEnv {
|
||||
__: unknown;
|
||||
}
|
||||
|
||||
declare interface ViteEnv {
|
||||
interface ViteEnv {
|
||||
VITE_PORT: number;
|
||||
VITE_USE_MOCK: boolean;
|
||||
VITE_USE_PWA: boolean;
|
||||
@@ -79,9 +79,9 @@ declare global {
|
||||
VITE_GENERATE_UI: string;
|
||||
}
|
||||
|
||||
declare function parseInt(s: string | number, radix?: number): number;
|
||||
function parseInt(s: string | number, radix?: number): number;
|
||||
|
||||
declare function parseFloat(string: string | number): number;
|
||||
function parseFloat(string: string | number): number;
|
||||
|
||||
namespace JSX {
|
||||
// tslint:disable no-empty-interface
|
||||
|
||||
Reference in New Issue
Block a user