Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Use as const to use the narrowest type for env
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb committed Feb 28, 2022
1 parent ad3b2b1 commit 27920af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Default environment variables are set on this key. Defaults are fallbacks to existing env vars.
* All boolean values should be designed to be false by default.
*/
export const env: Record<string, string> = {
export const env = {
apiUrl: process.env.API_URL ?? 'https://api.openverse.engineering/v1/',
filterStorageKey: 'openverse-filter-visibility',
notificationStorageKey: 'openverse-show-notification',
enableInternalAnalytics: process.env.ENABLE_INTERNAL_ANALYTICS ?? 'false',
}
} as const

0 comments on commit 27920af

Please sign in to comment.