title: Add typescript method's signature
body: <p>I'm using AngularJS v1.2.29 with newest TypeScript. I've had an issue with adding parameter to path without reloading page. I've found solution to this <a href="https://www.consolelog.io/angularjs-change-path-without-reloading/" rel="nofollow noreferrer">here</a>, so it about overload method in app.js. </p>
  
  <p><strong>app.js</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>app.run(['$route', '$rootScope', '$location', function ($route, $rootScope, $location) {
      var original = $location.path;
      $location.path = function (path, reload) {
          if (reload === false) {
              var lastRoute = $route.current;
              var un = $rootScope.$on('$locationChangeSuccess', function () {
                  $route.current = lastRoute;
                  un();
              });
          }
          return original.apply($location, [path]);
      };
  }])</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>The problem</strong> is that in the rest of the application I'm using TypeScript, so I'm getting error like "Build: Supplied parameters do not match any signature of call". I understand that I should add a signature of this new method as TypeScript doesn't see it. But I don't know what is a correct place to add it.</p>
  
  <p><strong>Usage in one of my controllers</strong></p>
  
  <pre><code>$location.path("Boo", false);
  </code></pre>