Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

DataInterfaceGetOptions<Item>: DataInterfaceGetOptionsArray<Item> | DataInterfaceGetOptionsObject<Item>

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

Type Parameters

  • Item

    Item type that may or may not have an id.

DataInterfaceOrder<Item>: keyof Item | ((a: Item, b: Item) => number)

Data interface order parameter.

  • A string value determines which property will be used for sorting (using < and > operators for numeric comparison).
  • A function will be used the same way as in Array.sort.

Type Parameters

  • Item

    Item type that may or may not have an id.

DataPipeFactory: InstanceType<typeof DataPipeUnderConstruction>

This interface is used to construct the pipe.

EventName: keyof EventPayloads<never, "">

Available event names.

EventNameWithAny: keyof EventPayloadsWithAny<never, "">

Available event names and '*' to listen for all.

Variables

DELETE: unique symbol

Use this symbol to delete properies in deepObjectAssign.

default: { DataSet: typeof DataSet; DataView: typeof DataView; Queue: typeof Queue }

Type declaration

Functions

  • createNewDataPipeFrom<SI, SP>(from: DataInterface<SI, SP>): DataPipeUnderConstruction<SI, SP>
  • Create new data pipe.

    remarks

    Example usage:

    interface AppItem {
    whoami: string;
    appData: unknown;
    visData: VisItem;
    }
    interface VisItem {
    id: number;
    label: string;
    color: string;
    x: number;
    y: number;
    }

    const ds1 = new DataSet<AppItem, "whoami">([], { fieldId: "whoami" });
    const ds2 = new DataSet<VisItem, "id">();

    const pipe = createNewDataPipeFrom(ds1)
    .filter((item): boolean => item.enabled === true)
    .map<VisItem, "id">((item): VisItem => item.visData)
    .to(ds2);

    pipe.start();

    Type Parameters

    • SI extends Partial<Record<SP, OptId>>

    • SP extends string = "id"

    Parameters

    Returns DataPipeUnderConstruction<SI, SP>

    A factory whose methods can be used to configure the pipe.

  • isDataSetLike<Item, IdProp>(idProp: IdProp, v: any): v is DataSet<Item, IdProp>
  • Check that given value is compatible with Vis Data Set interface.

    Type Parameters

    • Item extends Partial<Record<IdProp, OptId>>

    • IdProp extends string = "id"

    Parameters

    • idProp: IdProp

      The expected property to contain item id.

    • v: any

      The value to be tested.

    Returns v is DataSet<Item, IdProp>

    True if all expected values and methods match, false otherwise.

  • isDataViewLike<Item, IdProp>(idProp: IdProp, v: any): v is DataView<Item, IdProp>
  • Check that given value is compatible with Vis Data View interface.

    Type Parameters

    • Item extends Partial<Record<IdProp, OptId>>

    • IdProp extends string = "id"

    Parameters

    • idProp: IdProp

      The expected property to contain item id.

    • v: any

      The value to be tested.

    Returns v is DataView<Item, IdProp>

    True if all expected values and methods match, false otherwise.

Generated using TypeDoc