AssignableContext
Extends:
Direct Subclass:
Indirect Subclass:
A ReferenceContext with assignment support.
Constructor Summary
Public Constructor | ||
public |
constructor(context: object, parentContext: ReferenceContext | null, opts: object) |
Method Summary
Public Methods | ||
public |
generateReference(): * |
Inherited Summary
From class ReferenceContext | ||
public static |
isValidReference(reference: *): boolean Check if the given reference is valid. |
|
public get |
The the number of values in this context including it's parents. |
|
public get |
The the number of values in this context (excluding the parents). |
|
public get |
The the number of keys in this context (excluding the parents). |
|
public get |
Get the parent context. |
|
public get |
The the number of keys in this context including it's parents. |
|
public |
Assign a new reference for the given value or return it's current reference. |
|
public |
clear(): void Clear and release all the values on this context. |
|
public |
Create a closure context for this context. |
|
public |
copyFrom(context: ReferenceContext | Map | Array | object): ReferenceContext Copy from other context it's references and values |
|
public |
Remove the given reference from this context. |
|
public |
Check if this context or one of it's parents has the given value. |
|
public |
forEach(callback: function, thisArg: *): ReferenceContext Iterate over the context own values. |
|
public |
Generate a reference for the |
|
public |
Get the reference value on this context or it's parents. |
|
public |
Check if this context or it's parents has the given reference. |
|
public |
hasOwnReference(reference: Reference): boolean Check if this context only (and not the parents) has the given reference. |
|
public |
Get the reference of the given value in this context or one of it's parents. Return undefined if the value not exists. |
|
public |
Check if this context only (excluding the parents) has the given value. |
|
public |
Release a value from this context and remove any reference for this value. |
|
public |
set(reference: Reference, value: *): ReferenceContext Set a reference for the given value. |
|
public |
Get the instance constructor name. |
Public Constructors
public constructor(context: object, parentContext: ReferenceContext | null, opts: object) source
Create a reference-context instance.
Override:
ReferenceContext#constructorParams:
Name | Type | Attribute | Description |
context | object | The context |
|
parentContext | ReferenceContext | null | The context parent |
|
opts | object | Options |
|
opts.maxReferences | number |
|
The maximum references allowed to assign on this context |
Public Methods
public generateReference(): * source
Generate a reference for the assign
method.
The reference not required to be unique, the callee is responsible to verify that the
reference is not in use and if required call this method again.
Override:
ReferenceContext#generateReferenceReturn:
* |