title: How can I code a ui-router resolve if part of it will either return true or a promise?
body: <p>Here's the code that I have:</p>
  
  <pre><code>resolve: {
              get: ['setTest', 'questionService', 'testService', '$stateParams',
                  (setTest, qus: IQuestionService, tes: ITestService, $stateParams) =&gt; {
                      if (tes.qs) {
                          qus.mapUserTestQuestions(tes.qs);
                          return true;
                      } else {
                          var userTestId = parseInt($stateParams.testId.substring(6, 11));
                          return qus.getUserTestQuestions(userTestId);
                      }
                  }]
          },
  </code></pre>
  
  <p>The problem is that I get a message saying "No common return type" which I guess is because one part of the if returns true and the other a promise. </p>