Function overloading is only a type system feature; JavaScript/TypeScript does not directly support overloading on function arity.
What you want to write is this:
$scope.currentPath = function(arg?: string) {
if(arguments.length === 0) {
return _currentPath;
} else {
return _currentPath = arg;
}
}