Skip to content

Commit

Permalink
Create Onyx.log debugging utility
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Feb 24, 2024
1 parent 88a0f35 commit 53d8d20
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 53d8d20

Please sign in to comment.