Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more
Module

x/lunchbox/src/utils.ts>apDef

Component Library 🍱 for Deno πŸ¦• Fresh πŸ‹
Latest
function apDef
import { apDef } from "https://deno.land/x/lunchbox@v1.0.2/src/utils.ts";

This function uses an object that stores the default values for an interface T. It uses an input object of type Partial with new values to replace matching properties.

Type Parameters

T extends object

Parameters

d: T

Default values for non-optional values in interface T.

i: Partial<T>

New values recieved with type Partial<T>

Returns

An object of type T that contains the default d values and the new input i values.