ref: Convert some files to TS (#11929)

This commit is contained in:
Robert Pintilii
2022-07-29 16:18:14 +03:00
committed by GitHub
parent 5783e8992a
commit 69365d7e1f
20 changed files with 99 additions and 80 deletions

View File

@@ -0,0 +1,12 @@
/**
* Opens URL in the browser.
*
* @param {string} url - The URL to be opened.
* @param {boolean} openInNewTab - If the link should be opened in a new tab.
* @returns {void}
*/
export function openURLInBrowser(url: string, openInNewTab?: boolean) {
const target = openInNewTab ? '_blank' : '';
window.open(url, target, 'noopener');
}