How do I get the REST client using javascript?
<p>Visual studios has the following typescript code on their website that I was trying to follow as an example:</p>

<pre><code>import RestClient = require("TFS/WorkItemTracking/RestClient");
 // Get an instance of the client
var client = RestClient.getClient();
// Call a method on the client
// e.g. client.getResource(...).then(...);
</code></pre>

<p>Part of the javascript code I have is:</p>

<pre><code>VSS.init({
        explicitNotifyLoaded: true,
        usePlatformStyles: true
    });
  VSS.require([
      "VSS/Controls",
      "VSS/Controls/Menus",
      "VSS/Controls/Dialogs",
      "VSS/Service",
      "TFS/WorkItemTracking/RestClient",
      "VSS/WebApi/Contracts"],
      function (VSS_Service, TFS_Wit_WebApi) {
          //get the REST client
          var witClient = VSS_Service.getCollectionClient(TFS_Wit_WebApi.WorkItemTrackingHttpClient);
      }
  );
</code></pre>

<p>However when I do this I get an error that says that VSS_Service.getCollectionClient(TFS_Wit_WebApi.WorkItemTrackingHttpClient) is not a function.  Do I need to initialize VSS_Service other than the VSS.require(["VSS/Service"]?</p>