Skip to content

Commit

Permalink
Merge pull request #37172 from Expensify/Rory-OnyxLog
Browse files Browse the repository at this point in the history
[No QA] Create Onyx.log debugging utility
  • Loading branch information
rlinoz authored Feb 26, 2024
2 parents 6d20997 + 53d8d20 commit fa08e17
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/setup/addUtilsToWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ export default function addUtilsToWindow() {
});
};

// @ts-expect-error TS233 - injecting additional utility for use in runtime debugging, should not be used in any compiled code
window.Onyx.log = function (key) {
// @ts-expect-error TS2339 - using additional utility injected above
window.Onyx.get(key).then((value) => {
/* eslint-disable-next-line no-console */
console.log(value);
});
};

window.setSupportToken = Session.setSupportAuthToken;
});
}

0 comments on commit fa08e17

Please sign in to comment.