Tweak typing for shared global

This commit is contained in:
Dustin Brett
2024-11-16 19:26:25 -08:00
parent 976b15352d
commit 255f02b52f

View File

@@ -1,15 +1,15 @@
const DEFAULT_KEY = "DEFAULT";
const SET_KEY = "__setter__";
type SharedGlobal = {
[key: string]: unknown;
[DEFAULT_KEY]: unknown;
[SET_KEY]: string;
};
declare global {
interface Window {
sharedGlobals?: Record<
string,
{
[key: string]: unknown;
[SET_KEY]: string;
}
>;
sharedGlobals?: Record<string, SharedGlobal>;
}
}