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