title: how to set multiple CSS style properties in typescript for an element?
body: <p>Please consider the below snippet. i need to set multiple CSS properties in typescript. for that i have tried the below code.</p>
  
  <pre><code>public static setStyleAttribute(element: HTMLElement, attrs: { [key: string]: Object }): void {
          if (attrs !== undefined) {
              Object.keys(attrs).forEach((key: string) =&gt; {
                  element.style[key] = attrs[key];
              });
          }
      }
  </code></pre>
  
  <p>for the above code i need to pass the parameters as</p>
  
  <pre><code>let elem: HTMLElement = document.getElementById('myDiv');
  setStyleAttribute(elem, {font-size:'12px', color : 'red' , margin-top: '5px'});
  </code></pre>
  
  <p>But the above code throws error(tslint) as Element implicitly has an 'any' type because index expression is not of type 'number'.
  (property) HTMLElement.style: CSSStyleDeclaration.</p>
  
  <p>Please help me !!!</p>