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

10 lines
246 B
TypeScript
Raw Normal View History

import { z } from '../zod'
2022-11-29 10:02:40 +01:00
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>