@react-gnome/core
Version:
## Getting Started
13 lines (12 loc) • 322 B
JavaScript
// src/runtime/helpers/register-global.ts
function registerGlobal(key, getImplementation) {
const prevImpl = key in globalThis ? globalThis[key] : void 0;
Object.defineProperty(globalThis, key, {
value: getImplementation(prevImpl),
writable: false,
configurable: false
});
}
export {
registerGlobal
};