Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IObservableJSON

An observable JSON value.

Hierarchy

  • IObservableMap<ReadonlyPartialJSONValue | undefined>
    • IObservableJSON

Index

Properties

Readonly changed

changed: ISignal<this, IChangedArgs<T>>

A signal emitted when the map has changed.

Readonly isDisposed

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

Readonly size

size: number

The number of key-value pairs in the map.

type

type: "Map"

The type of the Observable.

Methods

clear

  • clear(): void
  • Set the ObservableMap to an empty map.

    Returns void

delete

  • delete(key: string): T | undefined
  • Remove a key from the map

    Parameters

    • key: string

      the key to remove.

    Returns T | undefined

    the value of the given key, or undefined if that does not exist.

dispose

  • dispose(): void
  • Dispose of the resources held by the map.

    Returns void

get

  • get(key: string): T | undefined
  • Get a value for a given key.

    Parameters

    • key: string

      the key.

    Returns T | undefined

    the value for that key.

has

  • has(key: string): boolean
  • Check whether the map has a key.

    Parameters

    • key: string

      the key to check.

    Returns boolean

    true if the map has the key, false otherwise.

keys

  • keys(): string[]
  • Get a list of the keys in the map.

    Returns string[]

    • a list of keys.

set

  • set(key: string, value: T): T | undefined
  • Set a key-value pair in the map

    Parameters

    • key: string

      The key to set.

    • value: T

      The value for the key.

    Returns T | undefined

    the old value for the key, or undefined if that did not exist.

toJSON

  • toJSON(): PartialJSONObject
  • Serialize the model to JSON.

    Returns PartialJSONObject

values

  • values(): T[]
  • Get a list of the values in the map.

    Returns T[]

    • a list of values.

Generated using TypeDoc