Hacker News new | past | comments | ask | show | jobs | submit login

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 ..."



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: