We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2eebb3d commit 9211342Copy full SHA for 9211342
1 file changed
src/utils/Environment.ts
@@ -6,12 +6,12 @@ export const isDevelopment = (): boolean => {
6
return import.meta.env.DEV
7
}
8
9
-export const isWebOrExtensionVersion = (): string => {
+export const isWebOrExtensionVersion = (): 'web' | 'extension' => {
10
const buildTarget = import.meta.env.VITE_BUILD_TARGET as 'web' | 'extension' | undefined
11
return buildTarget || 'web'
12
13
14
-export const getBrowserName = (): string => {
+export const getBrowserName = (): 'chrome' | 'firefox' | 'other' => {
15
let userAgent = navigator.userAgent
16
if (userAgent.match(/chrome|chromium|crios/i)) {
17
return 'chrome'
0 commit comments