Header menu logo DynamicObj

ImmutableDynamicObj Type

Represents an DynamicObj's counterpart with immutability enabled only.

Constructors

Constructor Description

ImmutableDynamicObj()

Full Usage: ImmutableDynamicObj()

Returns: ImmutableDynamicObj

Empty instance

Returns: ImmutableDynamicObj

ImmutableDynamicObj(map)

Full Usage: ImmutableDynamicObj(map)

Parameters:
    map : Map<string, obj>

Returns: ImmutableDynamicObj
map : Map<string, obj>
Returns: ImmutableDynamicObj

Instance members

Instance member Description

this[index]

Full Usage: this[index]

Parameters:
    index : string

Returns: obj

Indexes ; if no key found, throws

index : string
Returns: obj

this.TryGetTypedValue

Full Usage: this.TryGetTypedValue

Parameters:
    name : string

Returns: 'a option
name : string
Returns: 'a option

this.TryGetValue

Full Usage: this.TryGetValue

Parameters:
    name : string

Returns: obj option
name : string
Returns: obj option

Static members

Static member Description

ImmutableDynamicObj.add name newValue object

Full Usage: ImmutableDynamicObj.add name newValue object

Parameters:
    name : string
    newValue : obj
    object : 'a

Returns: 'a

Returns an instance with: 1. this property added if it wasn't present 2. this property updated otherwise

name : string
newValue : obj
object : 'a
Returns: 'a

ImmutableDynamicObj.addOpt name newValue object

Full Usage: ImmutableDynamicObj.addOpt name newValue object

Parameters:
    name : string
    newValue : 'a option
    object : 'b

Returns: 'b

Acts as add if the value is Some, returns the same object otherwise

name : string
newValue : 'a option
object : 'b
Returns: 'b

ImmutableDynamicObj.addOptBy name newValue f object

Full Usage: ImmutableDynamicObj.addOptBy name newValue f object

Parameters:
    name : string
    newValue : 'a option
    f : 'a -> 'b
    object : 'c

Returns: 'c

Acts as addOpt but maps the valid value through the last argument

name : string
newValue : 'a option
f : 'a -> 'b
object : 'c
Returns: 'c

ImmutableDynamicObj.combineWith sourceObject targetObject

Full Usage: ImmutableDynamicObj.combineWith sourceObject targetObject

Parameters:
    sourceObject : 'a
    targetObject : 'b

Returns: 'b

Merges the second ImmutableDynamicObj into the first one (that is, keeps the first one's type).

Warning: In case of duplicate property names the members of the second object override those of the first.

sourceObject : 'a
targetObject : 'b
Returns: 'b

ImmutableDynamicObj.empty

Full Usage: ImmutableDynamicObj.empty

Returns: ImmutableDynamicObj
Returns: ImmutableDynamicObj

ImmutableDynamicObj.format object

Full Usage: ImmutableDynamicObj.format object

Parameters:
    object : 'a

Returns: string
object : 'a
Returns: string

ImmutableDynamicObj.print object

Full Usage: ImmutableDynamicObj.print object

Parameters:
    object : 'a

object : 'a

ImmutableDynamicObj.remove name object

Full Usage: ImmutableDynamicObj.remove name object

Parameters:
    name : string
    object : 'a

Returns: 'a

Returns an instance: 1. the same if there was no requested property 2. without the requested property if there was

name : string
object : 'a
Returns: 'a

Type something to start searching.