Wraps assertion in a function that will be evaluated only when the assertion is called.
const user = object({ name; string, friend: optional(lazy(() => user))});user({ name: "yamiteru", friend: { name: "yamiteru", }}); // passes Copy
const user = object({ name; string, friend: optional(lazy(() => user))});user({ name: "yamiteru", friend: { name: "yamiteru", }}); // passes
Assertion to be lazily evaluated.
Wraps assertion in a function that will be evaluated only when the assertion is called.
Example