Usage
Signature:
class ObservableKeySet<K>
Generic Parameters
Parameter Description K Type of Key
Typescript Import Format
//To import this class, use the format below.
import {ObservableKeySet} from "ojs/ojknockout-keyset";
For additional information visit:
Constructor
new ObservableKeySet(initialValue)
Creates an observable whose value is a KeySet.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
initialValue |
KeySetImpl.<K> | AllKeySetImpl.<K> |
<optional> |
The KeySet to observe. |
Methods
-
add(keys) : {ObservableKeySet.<K>}
-
Equivalent to the add method on KeySet. Calls add method on the underlying KeySet and updates the observable with the returned KeySet.
Parameters:
Name Type Description keys
Set<K> | Array<K> a set of keys to add to this KeySet. Returns:
this observable KeySet.
- Type
- ObservableKeySet.<K>
-
addAll : {ObservableKeySet.<K>}
-
Equivalent to the addAll method on KeySet. Calls addAll method on the underlying KeySet and updates the observable with the returned KeySet.
Returns:
this observable KeySet.
- Type
- ObservableKeySet.<K>
-
clear : {ObservableKeySet.<K>}
-
Equivalent to the clear method on KeySet. Calls clear method on the underlying KeySet and updates the observable with the returned KeySet.
Returns:
this observable KeySet.
- Type
- ObservableKeySet.<K>
-
delete(keys) : {ObservableKeySet.<K>}
-
Equivalent to the delete method on KeySet. Calls delete method on the underlying KeySet and updates the observable with the returned KeySet.
Parameters:
Name Type Description keys
Set<K> | Array<K> a set of keys to remove from this KeySet. Returns:
this observable KeySet.
- Type
- ObservableKeySet.<K>