Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

Functions

Type aliases

ChainedObject

ChainedObject<T>: { [ key in keyof T]: (...p: Parameters<T[key]>) => ChainedObject<T> }

Type parameters

Functions

chain

  • Creates a chain with functions.

    example

    const chained = chain({ count: 1, increase(count: number) { this.count += count }, decrease(count: number) { this.count -= count } }); chained.increase(2).decrease(1);

    // => 2

    Type parameters

    • T: object

    Parameters

    • source: T

    Returns ChainedObject<PickRestrictedObject<T, Function>>

Generated using TypeDoc