How does TS declare a property as a class?

for example:

interface X {
  a: string
}

interface Y {
  X: X
}


class X implements X {
  public a: string = ""
}

const Y: Y = {
  X // <----- 
}

found that the X attribute reported an error when defining Y, and could not assign type "typeof X" to type "X". The attribute "a" is missing in type "typeof X".

Aug.02,2021

interface X {
  a: string
}


class X1 implements X {
  public a: string = ''
}

interface Y {
  X: typeof X1
}

const Y1: Y = {
  X:X1
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb44ae-24c4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb44ae-24c4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?