Show raw api
{
"functions": [
{
"name": "new",
"desc": "Constructs a new ObservableCountingMap",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "ObservableCountingMap<T>"
}
],
"function_type": "static",
"source": {
"line": 24,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "isObservableMap",
"desc": "Returns whether the value is an observable counting map",
"params": [
{
"name": "value",
"desc": "",
"lua_type": "any"
}
],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 72,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "__iter",
"desc": "Allows iteration over the observable counting map",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "(T) -> ((T, nextIndex: any) -> ...any, T?)"
}
],
"function_type": "method",
"source": {
"line": 81,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "ObserveKeysList",
"desc": "Observes the current set of active keys",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Observable<{ T }>"
}
],
"function_type": "method",
"source": {
"line": 89,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "ObserveKeysSet",
"desc": "Observes the current set of active keys",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Observable<{ [T]: true }>"
}
],
"function_type": "method",
"source": {
"line": 105,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "ObservePairsBrio",
"desc": "Observes all keys in the map",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Observable<Brio<(T, number)>>"
}
],
"function_type": "method",
"source": {
"line": 144,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "ObserveAtKey",
"desc": "Observes the value for the given key.",
"params": [
{
"name": "key",
"desc": "",
"lua_type": "TKey"
}
],
"returns": [
{
"desc": "",
"lua_type": "Observable<TValue?>"
}
],
"function_type": "method",
"source": {
"line": 181,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "ObserveKeysBrio",
"desc": "Observes all keys in the map",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Observable<Brio<T>>"
}
],
"function_type": "method",
"source": {
"line": 193,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "Contains",
"desc": "Returns whether the map contains the key",
"params": [
{
"name": "key",
"desc": "",
"lua_type": "T"
}
],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "method",
"source": {
"line": 233,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "Get",
"desc": "Returns the count for the key or 0 if there is no key",
"params": [
{
"name": "key",
"desc": "",
"lua_type": "T"
}
],
"returns": [
{
"desc": "",
"lua_type": "number"
}
],
"function_type": "method",
"source": {
"line": 244,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "GetTotalKeyCount",
"desc": "Gets the count of keys in the map",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "number"
}
],
"function_type": "method",
"source": {
"line": 254,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "ObserveTotalKeyCount",
"desc": "Observes the count of the keys in the map",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Observable<number>"
}
],
"function_type": "method",
"source": {
"line": 262,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "Set",
"desc": "Sets the current value",
"params": [
{
"name": "key",
"desc": "",
"lua_type": "T"
},
{
"name": "amount",
"desc": "",
"lua_type": "number?"
}
],
"returns": [
{
"desc": "",
"lua_type": "callback"
}
],
"function_type": "method",
"source": {
"line": 272,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "Add",
"desc": "Adds the key to the map if it does not exists.",
"params": [
{
"name": "key",
"desc": "",
"lua_type": "T"
},
{
"name": "amount",
"desc": "",
"lua_type": "number?"
}
],
"returns": [
{
"desc": "",
"lua_type": "callback"
}
],
"function_type": "method",
"source": {
"line": 295,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "Remove",
"desc": "Removes the key from the set if it exists.",
"params": [
{
"name": "key",
"desc": "",
"lua_type": "T"
},
{
"name": "amount",
"desc": "",
"lua_type": "number?"
}
],
"returns": [
{
"desc": "",
"lua_type": "callback"
}
],
"function_type": "method",
"source": {
"line": 361,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "GetFirstKey",
"desc": "Gets the first key",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "T"
}
],
"function_type": "method",
"source": {
"line": 373,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "GetKeyList",
"desc": "Gets a list of all keys.",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "{ T }"
}
],
"function_type": "method",
"source": {
"line": 382,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "Destroy",
"desc": "Cleans up the ObservableCountingMap and sets the metatable to nil.",
"params": [],
"returns": [],
"function_type": "method",
"source": {
"line": 393,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
}
],
"properties": [
{
"name": "KeyAdded",
"desc": "Fires when an key is added",
"lua_type": "Signal<T>",
"readonly": true,
"source": {
"line": 39,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "KeyRemoved",
"desc": "Fires when an key is removed.",
"lua_type": "Signal<T>",
"readonly": true,
"source": {
"line": 47,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "KeyChanged",
"desc": "Fires when an item count changes",
"lua_type": "Signal<T>",
"readonly": true,
"source": {
"line": 55,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
},
{
"name": "CountChanged",
"desc": "Fires when the total count changes.",
"lua_type": "RBXScriptSignal",
"source": {
"line": 62,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
}
],
"types": [],
"name": "ObservableCountingMap",
"desc": "An observable map that counts up/down and removes when the count is zero.",
"source": {
"line": 5,
"path": "src/observablecollection/src/Shared/ObservableCountingMap.lua"
}
}