title: Typescript Hoisting
body: <p>I am trying to understand hoisting in typescript. Does hoisting take place in Typescript and if yes, is there any difference compared to how it happens in Javascript.</p>
  <p>eg: The code transpiles fine even though I declared interface after the function that is using it. Is it safe to assume it happens due to hoisting as a part of transpilation or else there is something else involved here.</p>
  <pre><code>getCarDetails({name: 'Xyz', topSpeed: 300})
  
  function getCarDetails(carDetails: CarDetails) {
  
    console.log(carDetails.name);
  
    console.log(carDetails.topSpeed);
  
  }
  
  interface CarDetails {
  
    name: string;
  
    topSpeed: number;
  
  }
  </code></pre>