title: how to change `this` pointer in typescript
body: <p>I want to create a Image data and rewrite onload function , but <code>this</code> can't point to <code>newImage</code> in typescript. what can i do to make <code>this</code> pointer point to <code>newImage</code></p>
  <p><a href="https://i.stack.imgur.com/eLlDr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eLlDr.png" alt="enter image description here" /></a></p>