@@ -284,7 +284,7 @@ defmodule Agent do
284
284
instead of an anonymous function; `fun` in `module` will be called with the
285
285
given arguments `args` to initialize the state.
286
286
"""
287
- @ spec start_link ( module , atom , [ any ] , GenServer . options ( ) ) :: on_start
287
+ @ spec start_link ( module , atom , [ term ] , GenServer . options ( ) ) :: on_start
288
288
def start_link ( module , fun , args , options \\ [ ] ) do
289
289
GenServer . start_link ( Agent.Server , { module , fun , args } , options )
290
290
end
@@ -311,7 +311,7 @@ defmodule Agent do
311
311
312
312
See `start_link/4` for more information.
313
313
"""
314
- @ spec start ( module , atom , [ any ] , GenServer . options ( ) ) :: on_start
314
+ @ spec start ( module , atom , [ term ] , GenServer . options ( ) ) :: on_start
315
315
def start ( module , fun , args , options \\ [ ] ) do
316
316
GenServer . start ( Agent.Server , { module , fun , args } , options )
317
317
end
@@ -348,7 +348,7 @@ defmodule Agent do
348
348
instead of an anonymous function. The state is added as first
349
349
argument to the given list of arguments.
350
350
"""
351
- @ spec get ( agent , module , atom , [ term ] , timeout ) :: any
351
+ @ spec get ( agent , module , atom , [ term ] , timeout ) :: term
352
352
def get ( agent , module , fun , args , timeout \\ 5000 ) do
353
353
GenServer . call ( agent , { :get , { module , fun , args } } , timeout )
354
354
end
@@ -389,7 +389,7 @@ defmodule Agent do
389
389
instead of an anonymous function. The state is added as first
390
390
argument to the given list of arguments.
391
391
"""
392
- @ spec get_and_update ( agent , module , atom , [ term ] , timeout ) :: any
392
+ @ spec get_and_update ( agent , module , atom , [ term ] , timeout ) :: term
393
393
def get_and_update ( agent , module , fun , args , timeout \\ 5000 ) do
394
394
GenServer . call ( agent , { :get_and_update , { module , fun , args } } , timeout )
395
395
end
0 commit comments