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

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

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

Type Parameters

T
TFiltered extends T
TOnTrueResult
TOnFalseResult

Parameters

pred: (a: T) => a is TFiltered
onTrue: (a: TFiltered) => TOnTrueResult
onFalse: (a: Exclude<T, TFiltered>) => TOnFalseResult

Type Parameters

TArgs extends any[]
TOnTrueResult
TOnFalseResult

Parameters

fn: (...args: TArgs) => boolean
onTrue: (...args: TArgs) => TOnTrueResult
onFalse: (...args: TArgs) => TOnFalseResult