MVFM

zod/promise

Schema that wraps another schema in a Promise type

// Promise schemas require async parsing at runtime.
// This example builds the AST; use safeParseAsync in a real interpreter.
const app = mvfm(prelude, zod);
const prog = app({ value: "string" }, ($) => {
  return $.zod.promise($.zod.string()).safeParseAsync($.input.value);
});
Ctrl+Enter