2
0
Files
bot/packages/schemas/features/utils.ts
2023-03-15 08:35:16 +01:00

10 lines
243 B
TypeScript

import { z } from 'zod'
export type IdMap<T> = { [id: string]: T }
export const variableStringSchema = z.custom<`{{${string}}}`>((val) =>
/^{{.+}}$/g.test(val as string)
)
export type VariableString = z.infer<typeof variableStringSchema>