diff --git a/env-var.d.ts b/env-var.d.ts index b9bf31b..396b22f 100644 --- a/env-var.d.ts +++ b/env-var.d.ts @@ -101,7 +101,7 @@ type PublicAccessors = { /** * Verifies that the var being accessed is one of the given values */ - asEnum: (input: string, validValues: T[]) => T; + asEnum: (input: string, validValues: readonly T[]|T[]) => T; } interface VariableAccessors { @@ -201,7 +201,7 @@ interface VariableAccessors { /** * Verifies that the var being accessed is one of the given values */ - asEnum: (validValues: T[]) => AlternateType extends undefined ? undefined|T : T; + asEnum: (validValues: readonly T[]|T[]) => AlternateType extends undefined ? undefined|T : T; /** * Verifies that the variable is a valid regular expression and returns the