Module

x/rambda/mod.ts>propIs

Faster and smaller alternative to Ramda
Go to Latest
function propIs
import { propIs } from "https://dotland.deno.dev/x/rambda@v9.2.0/mod.ts";

It returns true if property of obj is from target type.

Type Parameters

C extends AnyFunction
K extends keyof any

Parameters

type: C
name: K
obj: any

Returns

obj is Record<K, ReturnType<C>>

Type Parameters

C extends AnyConstructor
K extends keyof any

Parameters

type: C
name: K
obj: any

Returns

obj is Record<K, InstanceType<C>>

Type Parameters

C extends AnyFunction
K extends keyof any

Parameters

type: C
name: K

Returns

(obj: any) => obj is Record<K, ReturnType<C>>

Type Parameters

C extends AnyConstructor
K extends keyof any

Parameters

type: C
name: K

Returns

(obj: any) => obj is Record<K, InstanceType<C>>

Type Parameters

C extends AnyFunction

Returns

{ <K extends keyof any>(name: K, obj: any): obj is Record<K, ReturnType<C>>; <K extends keyof any>(name: K): (obj: any) => obj is Record<K, ReturnType<C>>; }