title: Argument of type 'number' is not assignable to parameter of type 'string' using ParseInt
body: <p>I have a function that calculates a lighter/darker color by hex.</p>
  <p>On my localhost it runs just fine.. but when I try to build in Angular I get the error:</p>
  <pre><code>ERROR in src/app/requests.service.ts:1611:17 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
  1611  R = parseInt(R * (100 + percent) / 100);
  
  src/app/requests.service.ts:1612:17 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
  1612  G = parseInt(G * (100 + percent) / 100);
  
  src/app/requests.service.ts:1613:17 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
  1613  B = parseInt(B * (100 + percent) / 100);
  </code></pre>
  <p>Here is my code:</p>
  <pre><code>  adjust(color, percent) {
    
     var R = parseInt(color.substring(1,3),16);
     var G = parseInt(color.substring(3,5),16);
     var B = parseInt(color.substring(5,7),16);
  
     R = parseInt(R * (100 + percent) / 100);
     G = parseInt(G * (100 + percent) / 100);
     B = parseInt(B * (100 + percent) / 100);
  
     R = (R&lt;255)?R:255;
     G = (G&lt;255)?G:255;
     B = (B&lt;255)?B:255;
  
     var RR = ((R.toString(16).length==1)?&quot;0&quot;+R.toString(16):R.toString(16));
     var GG = ((G.toString(16).length==1)?&quot;0&quot;+G.toString(16):G.toString(16));
     var BB = ((B.toString(16).length==1)?&quot;0&quot;+B.toString(16):B.toString(16));
  
     return &quot;#&quot;+RR+GG+BB;
  }
  </code></pre>
  <p>I'm calling the function using:</p>
  <pre><code> adjust(&quot;#345678&quot;, -70)
  </code></pre>
  <p>I also tried defining the function parameters like this:</p>
  <pre><code>adjust(color:string, percent:number) {
  </code></pre>
  <p>but it wasn't successful.</p>
  <p>Any ideas would be great. Thank you!</p>