Skip to content

Commit c1910bd

Browse files
authored
Made ZodEnum take readonly string array (#3444)
1 parent 110b821 commit c1910bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4139,7 +4139,7 @@ export class ZodLiteral<T> extends ZodType<T, ZodLiteralDef<T>, T> {
41394139
export type ArrayKeys = keyof any[];
41404140
export type Indices<T> = Exclude<keyof T, ArrayKeys>;
41414141

4142-
export type EnumValues<T extends string = string> = [T, ...T[]];
4142+
export type EnumValues<T extends string = string> = readonly [T, ...T[]];
41434143

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

0 commit comments

Comments
 (0)