sockjs-erlang icon indicating copy to clipboard operation
sockjs-erlang copied to clipboard

Add module() as a union type of callback()

Open mikebeam opened this issue 12 years ago • 1 comments

According to to sockjs_session:emit/2, the callback can be a module name, which is how our code uses sockjs_handler:init_state/4. The definition of the callback() type as only a fun results in a number of dialyzer warnings, which are resolved by this change.

mikebeam avatar Oct 02 '13 13:10 mikebeam

The type signature of the function isn't correct anyway: it should be {ok, any()}, not just ok :/.

saurik avatar Apr 21 '14 05:04 saurik