Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ObservableJSON

A concrete Observable map for JSON data. The namespace for ObservableJSON static data.

Hierarchy

Implements

Index

Classes

Interfaces

Constructors

Accessors

Methods

Constructors

constructor

Accessors

changed

isDisposed

  • get isDisposed(): boolean

size

  • get size(): number

type

  • get type(): "Map"

Methods

clear

  • clear(): void

delete

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

    Parameters

    • key: string

      the key to remove.

    Returns JSONValue | undefined

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

    Notes

    This is a no-op if the value does not change.

dispose

  • dispose(): void

get

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

    Parameters

    • key: string

      the key.

    Returns JSONValue | 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[]

set

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

    throws

    if the new value is undefined.

    Notes

    This is a no-op if the value does not change.

    Parameters

    • key: string

      The key to set.

    • value: JSONValue

      The value for the key.

    Returns JSONValue | undefined

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

toJSON

  • toJSON(): JSONObject

values

  • values(): JSONValue[]

Generated using TypeDoc