title: Argument of type 'string | number | string[]' is not assignable to parameter of type 'string | number |
body: <p>I wrote ajQuery code to determine height and width and click functinality. Code is as given below:  </p>
  
  <pre><code>$(document).ready(function(){
        console.log("Jquery is working!");
        adjustBar();
        $(window).on('resize', function() {
          adjustBar();
        })
      $('#height').on('input change', function() {
          var height = $(this).val();
          if (height &gt;= 30) {
          var leftOffset = (Math.tan(45 * (Math.PI / 180)) * (height / 2) + 3) * -1;
          $('.steps').css('height', height).css('line-height', height + "px").css('left', leftOffset + "px");
          adjustBar();
        }
      });
      $('.steps').on('click', function() {
        $('.steps').removeClass('active');
        $(this).addClass('active');
      })
    });
    function adjustBar() {
        var items = $('.steps').length;
        var elHeight = $('.steps').height() / 2; //Division by 2 because each pseudo which is skewed is only 50% of its parent.
        var skewOffset = Math.tan(45 * (Math.PI / 180)) * elHeight;
        var reduction = skewOffset + ((items - 1) * 4);
        var leftOffset = $('.steps').css('left').replace('px', '');
        var factor = leftOffset * (-1) - 2;
        $('.steps').css({
          'width': '-webkit-calc((100% + 4px - ' + reduction + 'px)/' + items + ')'
        }); // 4px for borders on either side
        $('.steps:first-child, .steps:last-child').css({
          'width': '-webkit-calc((100% + 4px - ' + reduction + 'px)/' + items + ' + ' + factor + 'px)'
        }); // 26px because to make up for the left offset. Size of last-child is also increased to avoid the skewed area on right being shown  
        $('.steps span').css('padding-left', (skewOffset + 15) + "px");
        $('.steps:first-child span, .steps:last-child span').css({
          'width': '-webkit-calc(100% - ' + factor + 'px)'
        });
      }  
  </code></pre>
  
  <p>When I run that code, I get these errors:  </p>
  
  <blockquote>
    <p>error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
    event-viewer/event-viewer.component.ts(34,35): error TS2345: Argument of type 'string | number | string[]' is not assignable to parameter of type 'string | number | ((this: HTMLElement, index: number, value: string) => string | number | void)'.
      Type 'string[]' is not assignable to type 'string | number | ((this: HTMLElement, index: number, value: string) => string | number | void)'.
        Type 'string[]' is not assignable to type 'string'.
    event-viewer/event-viewer.component.ts(49,20): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.  </p>
  </blockquote>
  
  <p>It seems that <code>height</code>, <code>width</code> and <code>leftoffset</code> are considered as String, but they should be numerical values which are calculated by position of element in web page. How can I fix those errors? </p>