Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/valibot/src/methods/partial/partialAsync.ts>partialAsync

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Go to Latest
function partialAsync
import { partialAsync } from "https://deno.land/x/valibot@v0.13.0/src/methods/partial/partialAsync.ts";

Creates an async object schema consisting of all properties of an existing object schema set to optional.

Type Parameters

TObjectSchema extends ObjectSchema<any> | ObjectSchemaAsync<any>

Parameters

The affected schema.

optional
pipe: PipeAsync<ObjectOutput<Partial<TObjectSchema["object"]>>>

A validation and transformation pipe.

Returns

ObjectSchemaAsync<Partial<TObjectSchema["object"]>>

An async object schema.

Creates an async object schema consisting of all properties of an existing object schema set to optional.

Type Parameters

TObjectSchema extends ObjectSchema<any> | ObjectSchemaAsync<any>

Parameters

The affected schema.

optional
error: string

The error message.

optional
pipe: PipeAsync<ObjectOutput<Partial<TObjectSchema["object"]>>>

A validation and transformation pipe.

Returns

ObjectSchemaAsync<Partial<TObjectSchema["object"]>>

An async object schema.