UNPKG

@loken/hierarchies

Version:

Library for working with hierarchies of identifiers and identifiable objects.

6 lines (4 loc) 222 B
/** Means of getting an `Id` for an `Item`. */ export type Identify<Item, Id> = (item: Item) => Id; /** Means of getting multiple `Id`s related to an `item`. */ export type IdentifyMany<Item, Id> = (item: Item) => Id[];