A RangeReference that was created locally. See RealTimeString.rangeReference

### Hierarchy

- LocalModelReference<IndexRange, RangeReference>
  - LocalRangeReference

## Index

### Properties

- Events

### Methods

- addListener
- clear
- dispose
- events
- isDisposed
- isLocal
- isSet
- isShared
- key
- off
- on
- once
- reference
- removeAllListeners
- removeListener
- removeListeners
- sessionId
- set
- share
- source
- type
- unshare
- user
- value
- values

## Properties

### StaticEvents

Events: ModelReferenceEvents = ModelReference.Events

Inherited from LocalIndexReference.Events

A mapping of the events this model reference could emit to each event's unique name. Use this to refer an event name:

    localReference.on(LocalModelReference.Events.SET, function listener(e) {
      // ...
    })

## Methods

### addListener

- addListener(event: string, listener: ConvergenceEventListener<IConvergenceEvent>): ConvergenceEventEmitter<IConvergenceEvent>

- Inherited from ConvergenceEventEmitter.addListener

  Adds a new event listener for the specified event. The class will ignore duplicate registrations of the same listener to the same event.

  #### Parameters

  - ##### event: string

    The name of the event to add the listener for.

  - ##### listener: ConvergenceEventListener<IConvergenceEvent>

    The listener callback to register.

  #### Returns ConvergenceEventEmitter<IConvergenceEvent>

  This object, in support of a fluent API.

### clear

- clear(): void

- Inherited from LocalIndexReference.clear

  Clears any values on this reference. This is a way to explictly indicate that the reference currently has no value.

  #### Returns void

### dispose

- dispose(): void

- Inherited from LocalIndexReference.dispose

  Disposes the reference, unpublishing it beforehand if necessary.

  #### Returns void

### events

- events(): Observable<IConvergenceEvent>

- Inherited from ConvergenceEventEmitter.events

  Provides the events emitted by this object as an Observable stream.

  example

        eventEmitter.events()
          .filter(e => e.name === "myevent")
          .subscribe(e => console.log(e));

  #### Returns Observable<IConvergenceEvent>

  An Observable stream of all events emitted by this object.

### isDisposed

- isDisposed(): boolean

- Inherited from LocalIndexReference.isDisposed

  Returns true if this reference has already been disposed (cleaned up).

  #### Returns boolean

### isLocal

- isLocal(): boolean

- Inherited from LocalIndexReference.isLocal

  Returns true.

  #### Returns boolean

### isSet

- isSet(): boolean

- Inherited from LocalIndexReference.isSet

  Returns true if a value is currenly set on the reference.

  #### Returns boolean

### isShared

- isShared(): boolean

- Inherited from LocalIndexReference.isShared

  Returns true if this reference is currently being shared.

  #### Returns boolean

### key

- key(): string

- Inherited from LocalIndexReference.key

  Returns the unique key corresponding to this reference.

  #### Returns string

### off

- off(event: string, listener: ConvergenceEventListener<IConvergenceEvent>): ConvergenceEventEmitter<IConvergenceEvent>

- Inherited from ConvergenceEventEmitter.off

  Removes a single event listener for a specific event.

  #### Parameters

  - ##### event: string

    The name of the event to remove the listener for.

  - ##### listener: ConvergenceEventListener<IConvergenceEvent>

    The listener callback to unregister.

  #### Returns ConvergenceEventEmitter<IConvergenceEvent>

  This object, in support of a fluent API.

### on

- on(event: string, listener: ConvergenceEventListener<IConvergenceEvent>): ConvergenceEventEmitter<IConvergenceEvent>

- Inherited from ConvergenceEventEmitter.on

  Adds a new event listener for the specified event. The class will ignore duplicate registrations of the same listener to the same event.

  #### Parameters

  - ##### event: string

    The name of the event to add the listener for.

  - ##### listener: ConvergenceEventListener<IConvergenceEvent>

    The listener callback to register.

  #### Returns ConvergenceEventEmitter<IConvergenceEvent>

  This object, in support of a fluent API.

### once

- once(event: string, listener: ConvergenceEventListener<IConvergenceEvent>): ConvergenceEventEmitter<IConvergenceEvent>

- Inherited from ConvergenceEventEmitter.once

  Adds a single shot event listener for the specified event. The listener will be called the first time the specified event is fired after the event registration occurs, after which the registration will be removed and no further events will be passed to the listener.

  #### Parameters

  - ##### event: string

    The name of the event to add the listener for.

  - ##### listener: ConvergenceEventListener<IConvergenceEvent>

    The listener callback to register.

  #### Returns ConvergenceEventEmitter<IConvergenceEvent>

  This object, in support of a fluent API.

### reference

- reference(): RangeReference

- Inherited from LocalIndexReference.reference

  Returns the underlying ModelReference.

  #### Returns RangeReference

### removeAllListeners

- removeAllListeners(): ConvergenceEventEmitter<IConvergenceEvent>

- Inherited from ConvergenceEventEmitter.removeAllListeners

  Removes all listeners for all events. This is useful for cleanup before disposing of this particular event emitter.

  #### Returns ConvergenceEventEmitter<IConvergenceEvent>

  This object, in support of a fluent API.

### removeListener

- removeListener(event: string, listener: ConvergenceEventListener<IConvergenceEvent>): ConvergenceEventEmitter<IConvergenceEvent>

- Inherited from ConvergenceEventEmitter.removeListener

  Removes a single event listener for a specific event.

  #### Parameters

  - ##### event: string

    The name of the event to remove the listener for.

  - ##### listener: ConvergenceEventListener<IConvergenceEvent>

    The listener callback to unregister.

  #### Returns ConvergenceEventEmitter<IConvergenceEvent>

  This object, in support of a fluent API.

### removeListeners

- removeListeners(event: string): ConvergenceEventEmitter<IConvergenceEvent>

- Inherited from ConvergenceEventEmitter.removeListeners

  Removes all listeners bound on the given event.

  #### Parameters

  - ##### event: string

    the name of the event to remove listeners for

  #### Returns ConvergenceEventEmitter<IConvergenceEvent>

  This object, in support of a fluent API.

### sessionId

- sessionId(): string

- Inherited from LocalIndexReference.sessionId

  Returns the session ID of the user session that created this reference.

  #### Returns string

### set

- set(value: IndexRange): void
- set(value: IndexRange[]): void

- Inherited from LocalIndexReference.set

  Sets one or multiple values on this reference. If the reference is published, it will emit an event do any remote listeners.

  #### Parameters

  - ##### value: IndexRange

    the new value(s)

  #### Returns void

- Inherited from LocalIndexReference.set

  #### Parameters

  - ##### value: IndexRange[]

  #### Returns void

### share

- share(): void

- Inherited from LocalIndexReference.share

  Publishes the reference, such that other users with access to the attached model can access this reference and its underlying value(s).

  #### Returns void

### source

- source(): RealTimeElement<any> | RealTimeModel

- Inherited from LocalIndexReference.source

  Returns the element or model on which this reference was created.

  #### Returns RealTimeElement<any> | RealTimeModel

### type

- type(): ReferenceType

- Inherited from LocalIndexReference.type

  Returns a string indicating the type of reference this is.

  #### Returns ReferenceType

### unshare

- unshare(): void

- Inherited from LocalIndexReference.unshare

  Unpublishes the reference, essentially making it private.

  #### Returns void

### user

- user(): DomainUser

- Inherited from LocalIndexReference.user

  Returns the user that created this reference.

  #### Returns DomainUser

### value

- value(): IndexRange

- Inherited from LocalIndexReference.value

  Returns the first value of the underlying reference.

  #### Returns IndexRange

### values

- values(): IndexRange[]

- Inherited from LocalIndexReference.values

  Returns all values of the underlying reference.

  #### Returns IndexRange[]