Options
All
  • Public
  • Public/Protected
  • All
Menu

Data interface get options (returns an object).

remarks

The returned object has ids as keys and items as values of corresponding ids.

Type parameters

  • Item

    Item type that may or may not have an id.

Hierarchy

  • DataInterfaceGetOptionsBase<Item>
    • DataInterfaceGetOptionsObject

Index

Properties

Optional fields

fields?: Record<string, string> | string[]

An array with field names, or an object with current field name and new field name that the field is returned as. By default, all properties of the items are emitted. When fields is defined, only the properties whose name is specified in fields will be included in the returned items.

remarks

Warning: There is no TypeScript support for this.

Optional order

order?: DataInterfaceOrder<Item>

Order the items by a field name or custom sort function.

returnType

returnType: "Object"

Items will be returned as an object map (id → item).

Methods

Optional filter

  • filter(item: Item): boolean
  • Items can be filtered on specific properties by providing a filter function. A filter function is executed for each of the items in the DataSet, and is called with the item as parameter. The function must return a boolean. All items for which the filter function returns true will be emitted.

    Parameters

    • item: Item

    Returns boolean

Generated using TypeDoc