optimize(types): Enhance compatibility of global types (#494)
This commit is contained in:
parent
2198b982f0
commit
cd9d58d4de
4
src/typings/env.d.ts
vendored
4
src/typings/env.d.ts
vendored
@ -105,3 +105,7 @@ declare namespace Env {
|
|||||||
readonly VITE_STORAGE_PREFIX?: string;
|
readonly VITE_STORAGE_PREFIX?: string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface ImportMeta {
|
||||||
|
readonly env: Env.ImportMeta;
|
||||||
|
}
|
||||||
|
44
src/typings/global.d.ts
vendored
44
src/typings/global.d.ts
vendored
@ -1,27 +1,27 @@
|
|||||||
interface Window {
|
export {};
|
||||||
/** NProgress instance */
|
|
||||||
NProgress?: import('nprogress').NProgress;
|
declare global {
|
||||||
/** Loading bar instance */
|
export interface Window {
|
||||||
$loadingBar?: import('naive-ui').LoadingBarProviderInst;
|
/** NProgress instance */
|
||||||
/** Dialog instance */
|
NProgress?: import('nprogress').NProgress;
|
||||||
$dialog?: import('naive-ui').DialogProviderInst;
|
/** Loading bar instance */
|
||||||
/** Message instance */
|
$loadingBar?: import('naive-ui').LoadingBarProviderInst;
|
||||||
$message?: import('naive-ui').MessageProviderInst;
|
/** Dialog instance */
|
||||||
/** Notification instance */
|
$dialog?: import('naive-ui').DialogProviderInst;
|
||||||
$notification?: import('naive-ui').NotificationProviderInst;
|
/** Message instance */
|
||||||
|
$message?: import('naive-ui').MessageProviderInst;
|
||||||
|
/** Notification instance */
|
||||||
|
$notification?: import('naive-ui').NotificationProviderInst;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Document {
|
||||||
|
startViewTransition?: (callback: () => Promise<void> | void) => ViewTransition;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Build time of the project */
|
||||||
|
export const BUILD_TIME: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ViewTransition {
|
interface ViewTransition {
|
||||||
ready: Promise<void>;
|
ready: Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Document {
|
|
||||||
startViewTransition?: (callback: () => Promise<void> | void) => ViewTransition;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ImportMeta {
|
|
||||||
readonly env: Env.ImportMeta;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Build time of the project */
|
|
||||||
declare const BUILD_TIME: string;
|
|
||||||
|
Loading…
Reference in New Issue
Block a user