-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimize(types): Enhance compatibility of global types (#494)
- Loading branch information
Showing
2 changed files
with
26 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
interface Window { | ||
/** NProgress instance */ | ||
NProgress?: import('nprogress').NProgress; | ||
/** Loading bar instance */ | ||
$loadingBar?: import('naive-ui').LoadingBarProviderInst; | ||
/** Dialog instance */ | ||
$dialog?: import('naive-ui').DialogProviderInst; | ||
/** Message instance */ | ||
$message?: import('naive-ui').MessageProviderInst; | ||
/** Notification instance */ | ||
$notification?: import('naive-ui').NotificationProviderInst; | ||
} | ||
export {}; | ||
|
||
interface ViewTransition { | ||
ready: Promise<void>; | ||
} | ||
declare global { | ||
export interface Window { | ||
/** NProgress instance */ | ||
NProgress?: import('nprogress').NProgress; | ||
/** Loading bar instance */ | ||
$loadingBar?: import('naive-ui').LoadingBarProviderInst; | ||
/** Dialog instance */ | ||
$dialog?: import('naive-ui').DialogProviderInst; | ||
/** Message instance */ | ||
$message?: import('naive-ui').MessageProviderInst; | ||
/** Notification instance */ | ||
$notification?: import('naive-ui').NotificationProviderInst; | ||
} | ||
|
||
interface Document { | ||
startViewTransition?: (callback: () => Promise<void> | void) => ViewTransition; | ||
} | ||
export interface Document { | ||
startViewTransition?: (callback: () => Promise<void> | void) => ViewTransition; | ||
} | ||
|
||
interface ImportMeta { | ||
readonly env: Env.ImportMeta; | ||
/** Build time of the project */ | ||
export const BUILD_TIME: string; | ||
} | ||
|
||
/** Build time of the project */ | ||
declare const BUILD_TIME: string; | ||
interface ViewTransition { | ||
ready: Promise<void>; | ||
} |