TypeScript: Define a sub-type explicitly

后端 未结 0 1891
暖寄归人
暖寄归人 2021-01-24 20:49

Given type A, I want to define a sub-type B (B is assignable to A, without extra properties) and enforce that assign-ability.

Example

Given this type:

<         


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