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

x/valibot/mod.ts>unwrap

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

Unwraps the wrapped schema.

Type Parameters

TSchema extends
| OptionalSchema<any, any>
| OptionalSchemaAsync<any, any>
| NullableSchema<any, any>
| NullableSchemaAsync<any, any>
| NullishSchema<any, any>
| NullishSchemaAsync<any, any>
| NonOptionalSchema<any>
| NonOptionalSchemaAsync<any>
| NonNullableSchema<any>
| NonNullableSchemaAsync<any>
| NonNullishSchema<any>
| NonNullishSchemaAsync<any>

Parameters

schema: TSchema

The schema to be unwrapped.

Returns

TSchema["wrapped"]

The unwrapped schema.