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