Options
All
  • Public
  • Public/Protected
  • All
Menu

Data interface get options (returns a single item or an array).

remarks

Whether an item or and array of items is returned is determined by the type of the id(s) argument. If an array of ids is requested an array of items will be returned. If a single id is requested a single item (or null if the id doesn't correspond to any item) will be returned.

Type Parameters

  • Item

    Item type that may or may not have an id.

Hierarchy

  • DataInterfaceGetOptionsBase<Item>
    • DataInterfaceGetOptionsArray

Index

Properties

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.

order?: DataInterfaceOrder<Item>

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

returnType?: "Array"

Items will be returned as a single item (if invoked with an id) or an array of items (if invoked with an array of ids).

Methods

  • 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