🚨 fix: resolve linting type error
This commit is contained in:
@ -6,14 +6,17 @@ const includeOptions = ["preference", "assignedRoles"] as const;
|
||||
export const getUserOptionsSchema = z.object({
|
||||
verbosity: z.enum(
|
||||
["exists", "basic", "full"],
|
||||
"option: verbosity value must match with enum types"
|
||||
"option: verbosity value must match with enum types",
|
||||
),
|
||||
include: z
|
||||
.string()
|
||||
.optional()
|
||||
.transform((val) => val?.split(",") ?? [])
|
||||
.refine(
|
||||
(arr) => arr.every((val) => includeOptions.includes(val.trim() as any)),
|
||||
"option: include value didn't match with enum types"
|
||||
(arr) =>
|
||||
arr.every((val) =>
|
||||
includeOptions.includes(val.trim() as typeof includeOptions[number]),
|
||||
),
|
||||
"option: include value didn't match with enum types",
|
||||
),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user