interface object couldn't extends Record<string, unknown>

Viewed 1562

why interface couldn't extend Record

interface Data {
  a: string
}

Data extends Record<string, unknown> ? 'yes' : 'no' // 'no'

however, if I change the Data to type it works fine

type Data {
  a: string
}
 
Data extends Record<string, unknown> ? 'yes' : 'no' // 'yes'
1 Answers
Related