Hacker News new | ask | show | jobs
by ricksharp 2088 days ago
Not exactly (there is no duplication), a string constant in typescript is it's own type:

  const sql = 'SELECT ...';
  type SQL = typeof sql; 
  // type SQL = "SELECT ..."