Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/valibot/mod.ts>entriesFromList

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Latest
function entriesFromList
import { entriesFromList } from "https://deno.land/x/valibot@v0.35.0/mod.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.