avoid global pollution

This commit is contained in:
Pig Fang 2023-02-05 14:46:46 +08:00
parent b86469df7f
commit 707d043a76
No known key found for this signature in database
GPG Key ID: A8198F548DADA9E2

14
globals.d.ts vendored
View File

@ -35,10 +35,14 @@ declare class Toast {
error(message: string): void
}
// `var` is required here,
// otherwise the `blessing` property won't appear in `globalThis` type
declare var blessing: BlessingGlobals
export {}
interface Window {
blessing: BlessingGlobals
declare global {
// `var` is required here,
// otherwise the `blessing` property won't appear in `globalThis` type
declare var blessing: BlessingGlobals
interface Window {
blessing: BlessingGlobals
}
}