2
0
Files
bot/packages/schemas/features/utils.ts

10 lines
243 B
TypeScript
Raw Normal View History

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