Chartbreaker
    Preparing search index...

    Class SupplementaryData

    Used in generators to provide optional access to other spans, exchanges or quote types

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Phantom data for type inference

    Methods

    • Type Parameters

      • Type extends keyof SupplementaryData_Events
      • Callback extends
            | (() => void)
            | (
                (
                    errors: null | Record<string, ChartbreakerError>,
                    pushStates: Record<
                        string,
                        ChartbreakerError
                        | boolean
                        | DataLoaderTPush
                        | null,
                    >,
                ) => void
            )
            | (() => void)

      Parameters

      Returns this

      adds a listener to the end of the listeners array for the specified event.

    • Type Parameters

      • Type extends keyof SupplementaryData_Events
      • Callback extends
            | (() => void)
            | (
                (
                    errors: null | Record<string, ChartbreakerError>,
                    pushStates: Record<
                        string,
                        ChartbreakerError
                        | boolean
                        | DataLoaderTPush
                        | null,
                    >,
                ) => void
            )
            | (() => void)

      Parameters

      Returns boolean

      execute each of the listeners in order with the supplied parameters.

    • returns the index for the specified identifier in the data source for a particular span

      Parameters

      • span: ESpans

        the span to perform the lookup on

      • identifier: number

        an identifier unix timestamp

      Returns number

      an identifier

    • returns the identifier for the specified index in the data source for a particular span

      Parameters

      • span: ESpans

        the span to perform the lookup on

      • index: number

        an index

      Returns number

      an identifier unix timestamp

    • Type Parameters

      • Type extends keyof SupplementaryData_Events
      • Callback extends
            | (() => void)
            | (
                (
                    errors: null | Record<string, ChartbreakerError>,
                    pushStates: Record<
                        string,
                        ChartbreakerError
                        | boolean
                        | DataLoaderTPush
                        | null,
                    >,
                ) => void
            )
            | (() => void)

      Parameters

      Returns Callback[]

      returns an array of listeners for the specified event.

    • Type Parameters

      • Type extends keyof SupplementaryData_Events
      • Callback extends
            | (() => void)
            | (
                (
                    errors: null | Record<string, ChartbreakerError>,
                    pushStates: Record<
                        string,
                        ChartbreakerError
                        | boolean
                        | DataLoaderTPush
                        | null,
                    >,
                ) => void
            )
            | (() => void)

      Parameters

      Returns this

      alias for addListener

    • Type Parameters

      • Type extends keyof SupplementaryData_Events
      • Callback extends
            | (() => void)
            | (
                (
                    errors: null | Record<string, ChartbreakerError>,
                    pushStates: Record<
                        string,
                        ChartbreakerError
                        | boolean
                        | DataLoaderTPush
                        | null,
                    >,
                ) => void
            )
            | (() => void)

      Parameters

      Returns this

      adds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed.

    • Type Parameters

      • Type extends keyof SupplementaryData_Events
      • Callback extends
            | (() => void)
            | (
                (
                    errors: null | Record<string, ChartbreakerError>,
                    pushStates: Record<
                        string,
                        ChartbreakerError
                        | boolean
                        | DataLoaderTPush
                        | null,
                    >,
                ) => void
            )
            | (() => void)

      Parameters

      Returns this

      remove a listener from the listener array for the specified event.

    • Parameters

      • maxListeners: number

      Returns this

      by default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default which helps finding memory leaks. Obviously not all Emitters should be limited to 10. This function allows that limit to be increased. Set to zero for unlimited.

    • Parameters

      • maxListeners: number

      Returns void

      set default amount for limit warning