Added explicit return type

Without explicit return types everywhere, the definition cannot be used in projects that build with --noImplicitAny flag.
Merge pull request #3339 from danielearwicker/master

Added explicit return type