Options
All
  • Public
  • Public/Protected
  • All
Menu

spectrum-kit

Index

Type aliases

Features

Features: {}

Type declaration

  • [key: string]: boolean

IDllSerializedList

IDllSerializedList<T>: IDllSerializedNode<T>[]

Type parameters

  • T

Functions

Const createFeatureToggle

  • createFeatureToggle(state: Features): { disableFeature: (Anonymous function); enableFeature: (Anonymous function); isEnabled: (Anonymous function) }
  • A feature toggle function that returns an object with methods to check if a feature is enabled, enable a feature, and disable a feature

    Parameters

    • state: Features

      An object with feature names as keys and booleans as values

    Returns { disableFeature: (Anonymous function); enableFeature: (Anonymous function); isEnabled: (Anonymous function) }

    an object with methods to check if a feature is enabled, enable a feature, and disable a feature

    • disableFeature: (Anonymous function)
    • enableFeature: (Anonymous function)
    • isEnabled: (Anonymous function)

Const deserializeDoubleLinkedList

  • For a given array of objects representing a doubly linked list, deserialize the data into a doubly linked list node.

    Type parameters

    • T

    Parameters

    Returns DoubleLinkedListNode<T> | null

    a doubly linked list node deserialize from the data, where the first index 0 is the current node

Const disableFeature

  • disableFeature(state: Features): (Anonymous function)

Const enableFeature

  • enableFeature(state: Features): (Anonymous function)

Const isEnabled

  • isEnabled(state: Features): (Anonymous function)

Const serializeDoubleLinkedList

  • For a given doubly linked list node, serialize the list into an array of objects so that it can be stored in a local storage or sent over the network.

    Type parameters

    • T

    Parameters

    Returns IDllSerializedList<T>

    an array of objects representing the doubly linked list, where the first index 0 is the current node

Generated using TypeDoc