Options
All
  • Public
  • Public/Protected
  • All
Menu

Already mixed class. Plug and play.

Type parameters

Hierarchy

Indexable

[key: string]: any

Already mixed class. Plug and play.

Index

Constructors

Static constructor

  • new StackableCursor(id?: string): any
  • Parameters

    • Optional id: string

    Returns any

Properties

Static bundlesStack

bundlesStack: object

Type declaration

Static data

data: any

Data of cursor, changing at every cursor.apply()

Static emitter

emitter: EventEmitter

Static id

id: string

Static isDestroyed

isDestroyed: boolean

Static nextBundleIndex

nextBundleIndex: number

Static query

query: any

Abstract query for some source, which makes the source be able to send bundles to this cursor.

Static queryId

queryId: string

Unic id for every execution of query.

Methods

Static apply

Static destroy

  • destroy(): void
  • Returns void

Static emit

  • emit<IE>(eventName: IE, data: IEventsList[IE]): this
  • Type parameters

    • IE: keyof IEventsList

    Parameters

    • eventName: IE
    • data: IEventsList[IE]

    Returns this

Static exec

  • exec(query: any, data?: any): this

Static generateId

  • generateId(): string
  • Returns string

Static get

  • Get data by path from cursor.

    example
    import { Cursor } from 'ancient-cursor/lib/cursor';
    
    const cursor = new Cursor();
    cursor.exec(true, { a: [ { x: 2, b: 123 } ] });
    
    cursor.data; // { a: [ { x: 2, b: 123 } ] }
    
    cursor.get("a.0[b]"); // 123
    cursor.get(['a',0,'b']); // 123
    cursor.get(['a',{ x: 2 },'b']); // 123
    
    

    Parameters

    Returns any

Static off

  • off<IE>(eventName: IE, listener: function): this
  • Type parameters

    • IE: keyof IEventsList

    Parameters

    • eventName: IE
    • listener: function
        • (data: IEventsList[IE]): void
        • Parameters

          • data: IEventsList[IE]

          Returns void

    Returns this

Static on

  • on<IE>(eventName: IE, listener: function): this
  • Type parameters

    • IE: keyof IEventsList

    Parameters

    • eventName: IE
    • listener: function
        • (data: IEventsList[IE]): void
        • Parameters

          • data: IEventsList[IE]

          Returns void

    Returns this

Static once

  • once<IE>(eventName: IE, listener: function): this
  • Type parameters

    • IE: keyof IEventsList

    Parameters

    • eventName: IE
    • listener: function
        • (data: IEventsList[IE]): void
        • Parameters

          • data: IEventsList[IE]

          Returns void

    Returns this

Static parse

Generated using TypeDoc