1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-06 03:50:15 +02:00

Add type specs for Module:opt_type/1

This commit is contained in:
Evgeniy Khramtsov 2017-05-08 12:59:28 +03:00
parent 6aefd24eb3
commit 01a2c9fe12
40 changed files with 258 additions and 34 deletions

View file

@ -154,6 +154,8 @@ encode(L) -> str:join(L, <<":">>).
decode([0, 0]) -> false;
decode([0, 1]) -> true.
-spec opt_type(extauth_instances) -> fun((pos_integer()) -> pos_integer());
(atom()) -> [atom()].
opt_type(extauth_instances) ->
fun (V) when is_integer(V), V > 0 -> V end;
opt_type(_) -> [extauth_instances].