@robbiemu/handy-typescript

@robbiemu/handy-typescript / Modules / Entry

Class: Entry

Description

helper methods for working with entries

Table of contents

Constructors

Methods

Constructors

constructor

new Entry()

Methods

keyOf

Static keyOf<K, V>(entry): K

Static

Method

keyOf the key of an entry

Type parameters

Name
K
V

Parameters

Name Type
entry FixedSizeArray<2, K & V, "0">

Returns

K

the key

Defined in

src/utility/entry.ts:15


maxKey

Static maxKey<K, V>(transformer?): [Reducer<K>, null]

Static

Method

maxKey

Type parameters

Name
K
V

Parameters

Name Type Description
transformer? Function a helper function to traverse entries to comparing which is max, by default by comparing the keys

Returns

[Reducer<K>, null]

helper args to the reduce function which produces the max key according to the greater-than operator on the transformed entry

Defined in

src/utility/entry.ts:35


maxKeys

Static maxKeys<K, V>(transformer?): [Reducer<K>, null]

Static

Method

maxKeys

Type parameters

Name
K
V

Parameters

Name Type Description
transformer? Function a helper function to traverse entries to comparing which is max, by default by comparing the keys

Returns

[Reducer<K>, null]

helper args to the reduce function which produces all maximal keys according to the greater-than operator on the transformed entry

Defined in

src/utility/entry.ts:59


valueOf

Static valueOf<K, V>(entry): V

Static

Method

valueOf the value of an entry

Type parameters

Name
K
V

Parameters

Name Type
entry FixedSizeArray<2, K & V, "0">

Returns

V

the value

Defined in

src/utility/entry.ts:25