type specs update

This commit is contained in:
alisdair sullivan 2011-07-17 00:37:44 -07:00
parent cc10a736cd
commit 24492e2bdf

View file

@ -62,18 +62,23 @@
| {literal, null}. | {literal, null}.
-type jsx_encodeable() :: jsx_event() | [jsx_encodeable()].
-type jsx_iterator() :: jsx_decoder() | jsx_encoder(). -type jsx_iterator() :: jsx_decoder() | jsx_encoder().
%% this probably doesn't work properly %% this probably doesn't work properly
-type jsx_decoder() :: fun((binary()) -> jsx_iterator_result()). -type jsx_decoder() :: fun((binary()) -> jsx_iterator_result()).
-type jsx_encoder() :: fun((list(jsx_event())) -> jsx_iterator_result()).
-type jsx_encoder() :: fun((jsx_encodeable()) -> jsx_iterator_result()).
-type jsx_iterator_result() :: -type jsx_iterator_result() ::
{event, jsx_event(), fun(() -> jsx_iterator_result())} {event, jsx_event(), fun(() -> jsx_iterator_result())}
| {incomplete, jsx_iterator()} | {incomplete, jsx_iterator()}
| {error, {badjson, binary()}}. | {error, {badjson, any()}}.