Type inference on Typescript interfaces

后端 未结 0 624
孤街浪徒
孤街浪徒 2021-02-05 03:18

If we have this structure on typescript:

type A = {
  v: number | string[]
}

interface B {
  a: A;
}

class C implements B {
  a = {
    v: 3 // inference only w         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题