Prefer init over add, mark add as deprecated
This commit is contained in:
parent
74671b21c5
commit
7e953ca00b
@ -129,12 +129,12 @@ end
|
|||||||
---@param key string key name
|
---@param key string key name
|
||||||
---@param value any initial value
|
---@param value any initial value
|
||||||
---@param callback? function Callback function to run on value change
|
---@param callback? function Callback function to run on value change
|
||||||
function sharedstate.add(key, value, callback)
|
function sharedstate.init(key, value, callback)
|
||||||
logging.trace("sharedstate.add", key, value, callback)
|
logging.trace("sharedstate.init", key, value, callback)
|
||||||
set_value(key, value, callback)
|
set_value(key, value, callback)
|
||||||
end
|
end
|
||||||
-- alias so i can decide what feels better
|
---@deprecated use sharedstate.init instead
|
||||||
sharedstate.init=sharedstate.add
|
sharedstate.add=sharedstate.init
|
||||||
|
|
||||||
--- Internal; transfer value over network
|
--- Internal; transfer value over network
|
||||||
---Ping used to transfer a value over the network, should not be called
|
---Ping used to transfer a value over the network, should not be called
|
||||||
|
Loading…
x
Reference in New Issue
Block a user