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

x/rambda/files/index.d.ts>propOr

Faster and smaller alternative to Ramda
Go to Latest
function propOr
import { propOr } from "https://deno.land/x/rambda@v8.6.0/files/index.d.ts";

Type Parameters

T
P extends string

Parameters

defaultValue: T
property: P
obj: Partial<Record<P, T>> | undefined

Type Parameters

T
P extends string

Parameters

defaultValue: T
property: P

Returns

(obj: Partial<Record<P, T>> | undefined) => T

Parameters

defaultValue: T

Returns

{ <P extends string>(property: P, obj: Partial<Record<P, T>> | undefined): T; <P extends string>(property: P): (obj: Partial<Record<P, T>> | undefined) => T; }