sockjs / sockjs-erlang

WebSocket emulation - Erlang server
http://sockjs.org
Other
266 stars 120 forks source link

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

Open mikebeam opened 11 years ago

mikebeam commented 11 years ago

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.

saurik commented 10 years ago

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