Skip to content

Commit 9211342

Browse files
committed
refactor: Update return types for environment utility functions
1 parent 2eebb3d commit 9211342

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/utils/Environment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ export const isDevelopment = (): boolean => {
66
return import.meta.env.DEV
77
}
88

9-
export const isWebOrExtensionVersion = (): string => {
9+
export const isWebOrExtensionVersion = (): 'web' | 'extension' => {
1010
const buildTarget = import.meta.env.VITE_BUILD_TARGET as 'web' | 'extension' | undefined
1111
return buildTarget || 'web'
1212
}
1313

14-
export const getBrowserName = (): string => {
14+
export const getBrowserName = (): 'chrome' | 'firefox' | 'other' => {
1515
let userAgent = navigator.userAgent
1616
if (userAgent.match(/chrome|chromium|crios/i)) {
1717
return 'chrome'

0 commit comments

Comments
 (0)