mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-10 00:12:22 +08:00
10 lines
282 B
TypeScript
10 lines
282 B
TypeScript
import { values } from './globals/runtime';
|
|
import { globals } from './globals/types';
|
|
|
|
const getKeys = Object.keys as <T extends object>(obj: T) => Array<keyof T>;
|
|
|
|
// Apply all the globals
|
|
getKeys(globals).forEach((key) => {
|
|
(globalThis as any)[globals[key]] = values[key];
|
|
});
|