There are some setters in Box2D, that have arguments of abstract class in signature (i.e. void SetDebugDraw(b2Draw* debugDraw);) but in there is no way to create object that passes type check created by SWIG for those setters. Neither of ways to set b2Draw as prototype for argument of SetDebugDraw is working.
I believe that the only way to resolve this issue is to create SWIG typemap.
http://stackoverflow.com/questions/33573916/swig-javascript-c-arguments-handling