title: How do you create custom Event in Typescript?
body: <p>How do i create a customEvent Typescript and use it? I found this link on javascript on Mozilla site (<a href="https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent" rel="noreferrer">https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent</a>)</p>
  
  <p>I am just doing some testing on custom Event but Typescript see it as an error. what i am planning on doing is add some extra data into the details property to use later: here is my code.</p>
  
  <pre><code>let div:any=document.getElementById("my_div");
  
  let c_event = new CustomEvent("build",{'details':3 });
  
  div.addEventListener("build",function(e:Event){
      console.log(e.details);
  }.bind(this));
  
  div.dispatchEvent(c_event);
  </code></pre>