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;
|
||||||
|
}
|
||||||
|
24
src/typings/global.d.ts
vendored
24
src/typings/global.d.ts
vendored
@ -1,4 +1,7 @@
|
|||||||
interface Window {
|
export {};
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
export interface Window {
|
||||||
/** NProgress instance */
|
/** NProgress instance */
|
||||||
NProgress?: import('nprogress').NProgress;
|
NProgress?: import('nprogress').NProgress;
|
||||||
/** Loading bar instance */
|
/** Loading bar instance */
|
||||||
@ -9,19 +12,16 @@ interface Window {
|
|||||||
$message?: import('naive-ui').MessageProviderInst;
|
$message?: import('naive-ui').MessageProviderInst;
|
||||||
/** Notification instance */
|
/** Notification instance */
|
||||||
$notification?: import('naive-ui').NotificationProviderInst;
|
$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