Skip to content

Commit 42055a0

Browse files
committed
use typeof
1 parent 6e5275f commit 42055a0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/GlobalSettings.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
* Stores settings from Onyx.init globally so they can be made accessible by other parts of the library.
33
*/
44

5-
type GlobalSettings = {
6-
enablePerformanceMetrics: boolean;
7-
};
8-
9-
const globalSettings: GlobalSettings = {
5+
const globalSettings = {
106
enablePerformanceMetrics: false,
117
};
128

9+
type GlobalSettings = typeof globalSettings;
10+
1311
const listeners = new Set<(settings: GlobalSettings) => unknown>();
1412
function addGlobalSettingsChangeListener(listener: (settings: GlobalSettings) => unknown) {
1513
listeners.add(listener);

0 commit comments

Comments
 (0)