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

x/valibot/mod.ts>transform

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

Adds a transformation step to a schema, which is executed at the end of parsing and can change the output type.

Type Parameters

TSchema extends BaseSchema
TOutput

Parameters

schema: TSchema

The schema to be used.

action: (input: Output<TSchema>, info: TransformInfo) => TOutput

The transformation action.

optional
pipe: Pipe<TOutput>

A validation pipe.

Adds a transformation step to a schema, which is executed at the end of parsing and can change the output type.

Type Parameters

TSchema extends BaseSchema
TOutput

Parameters

schema: TSchema

The schema to be used.

action: (input: Output<TSchema>, info: TransformInfo) => TOutput

The transformation action.

optional
validation: BaseSchema<TOutput>

A validation schema.