UNPKG

lean4-code-actions

Version:

Refactorings and snippets for Lean 4

7 lines (5 loc) 274 B
import { boolean, map, ZodSchema } from 'zod' import { ZodTypeDef } from 'zod/lib/types' export const OptionBoolMap = <Output = unknown, Def extends ZodTypeDef = ZodTypeDef, Input = Output>(key: ZodSchema<Output, Def, Input>) => { return map(key, boolean().optional()) }