Skip to content

Commit

Permalink
use typeof
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Nov 27, 2024
1 parent 6e5275f commit 42055a0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/GlobalSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
* Stores settings from Onyx.init globally so they can be made accessible by other parts of the library.
*/

type GlobalSettings = {
enablePerformanceMetrics: boolean;
};

const globalSettings: GlobalSettings = {
const globalSettings = {
enablePerformanceMetrics: false,
};

type GlobalSettings = typeof globalSettings;

const listeners = new Set<(settings: GlobalSettings) => unknown>();
function addGlobalSettingsChangeListener(listener: (settings: GlobalSettings) => unknown) {
listeners.add(listener);
Expand Down

0 comments on commit 42055a0

Please sign in to comment.