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

x/valibot/src/index.ts>entriesFromList

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

Creates a object entries definition from a list of keys and a schema.

Type Parameters

TList extends readonly string[]
TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>>

Parameters

list: TList

A list of keys.

schema: TSchema

The schema of the keys.

Returns

Record<TList[number], TSchema>

The object entries.