moved delegate declaration (interface in ts) outside class declaration
improved method overload handling