Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
robertherber committed Jan 21, 2025
1 parent 7ac2103 commit 9a7ae43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/utils/node/parseEnv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ export function parseEnvEnum<
): T | TDefault {
const rawValue = env[prop]

const enumOrArray = Object.values(validValues)
// @ts-expect-error this is contained
const isPartOfEnumOrArray = rawValue ? enumOrArray.includes(rawValue) : false
const enumOrArray = Object.values(validValues) as readonly T[]

const isPartOfEnumOrArray = rawValue ? enumOrArray.includes(rawValue as T) : false

if (isPartOfEnumOrArray) {
return rawValue as T & TDefault
Expand Down

0 comments on commit 9a7ae43

Please sign in to comment.