We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e5275f commit 42055a0Copy full SHA for 42055a0
lib/GlobalSettings.ts
@@ -2,14 +2,12 @@
2
* Stores settings from Onyx.init globally so they can be made accessible by other parts of the library.
3
*/
4
5
-type GlobalSettings = {
6
- enablePerformanceMetrics: boolean;
7
-};
8
-
9
-const globalSettings: GlobalSettings = {
+const globalSettings = {
10
enablePerformanceMetrics: false,
11
};
12
+type GlobalSettings = typeof globalSettings;
+
13
const listeners = new Set<(settings: GlobalSettings) => unknown>();
14
function addGlobalSettingsChangeListener(listener: (settings: GlobalSettings) => unknown) {
15
listeners.add(listener);
0 commit comments