Skip to content

Commit

Permalink
Made ZodEnum take readonly string array (#3444)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlpaten authored Apr 29, 2024
1 parent 110b821 commit c1910bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4139,7 +4139,7 @@ export class ZodLiteral<T> extends ZodType<T, ZodLiteralDef<T>, T> {
export type ArrayKeys = keyof any[];
export type Indices<T> = Exclude<keyof T, ArrayKeys>;

export type EnumValues<T extends string = string> = [T, ...T[]];
export type EnumValues<T extends string = string> = readonly [T, ...T[]];

export type Values<T extends EnumValues> = {
[k in T[number]]: k;
Expand Down

0 comments on commit c1910bd

Please sign in to comment.