Skip to content

Commit

Permalink
Fix missing options type on enums
Browse files Browse the repository at this point in the history
  • Loading branch information
rossholdway committed Jan 18, 2024
1 parent 9c5e07f commit 0e80560
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rules/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import { Codes, Rule } from "../mod.ts";
*/
export type enums = typeof enums;

export function enums<T extends string>(values: readonly T[]): Rule<T>;
export function enums<T extends string>(
values: readonly T[],
options?: { required_error?: string; invalid_enum_error?: string; }
): Rule<T>;

export function enums(
values: readonly unknown[],
Expand Down

0 comments on commit 0e80560

Please sign in to comment.