title: Typescript Property 'style' does not exist on type 'HTMLElement'
body: <p>Although my code works (below), typescript is throwing errors saying "Property 'style' does not exist on type 'HTMLElement'."</p>
  
  <p>As you can see I am grabbing the element via jQuery &amp; the element's ID. </p>
  
  <pre><code>$(this.id).click(function () {
    this.style.display = 'none';
  });
  </code></pre>
  
  <p>But this causes the following error:</p>
  
  <pre><code>`TS2339: Property 'style' does not exist on type 'HTMLElement'`.
  </code></pre>
  
  <p>I am not sure what would be the proper way of handling this ts error.</p>
  
  <p>Would anyone let me know?</p>
  
  <p>Thank you in advance.</p>
  
  <p>more code, since it was requested:</p>
  
  <pre><code>`/**
  * Class represents a flash message
  */
  export class FlashMessage {    
  flashMessageParentDivID:string;
  iconID:string;
  textID:string;
  $: JQuery;
  
  /**
   * 
   * @param {string} flashMessageParentDiv - the string of the div's ID.
   */ 
  constructor (flashMessageParentDiv: string, $: JQuery) {
      this.flashMessageParentDivID = "#"+flashMessageParentDiv;
      this.iconID = "#flash-message-icon",
      this.textID = "#flash-message-text";
      this.$ = $;
  }
  
  /**
   * Displays the passed in message with the appropriate status.
   * @param {string} message - the message we want to flash.
   * @param {string} status: either 'error' or 'success'
   */
  showWithMessage = function (message: string, status: string) {
      //@todo: maybe throw an error if status does not equal error or   success.
      this.clearAndCreateFlashMessageInnerds();
      this.$(this.flashMessageParentDivID).removeAttr("class");
      this.$(this.flashMessageParentDivID).addClass(status);
  
      this.$(this.iconID).removeAttr("class");
      this.$(this.iconID).addClass("k-icon k-i-" + status);
  
      this.$(this.textID).text(message);
      this.$(this.flashMessageParentDivID).show();   
  
      this.$(this.flashMessageParentDivID).click(function () {
          (&lt;any&gt;this).style.display = 'none';
      });
  };
  </code></pre>
  
  <p>...`</p>
  
  <p><a href="https://i.stack.imgur.com/JX4ho.png" rel="noreferrer"><img src="https://i.stack.imgur.com/JX4ho.png" alt="typescript throwing errors"></a></p>