title: How to use onload event from Image in typescript?
body: <p>I want to get some info from an image that i load using new image() with typescript. I try this code:</p>
  
  <pre><code>width;
  heigth;
  init(){
      let image = new Image();
      image.src = "url";
  
      image.onload((event) =&gt; {
      this.width = event.width;
      this.heigth = event.heigth;
      })
  }
  </code></pre>
  
  <p>But i get this error: </p>
  
  <blockquote>
    <p>void' is not assignable to parameter of type 'Event'. Property
    'bubbles' is missing in type '() => void'</p>
  </blockquote>
  
  <p>I search examples on how to use this event but i can't find anything.</p>