Why is it allowed to intersect primitives and objects in TypeScript?

后端 未结 0 1363
一向
一向 2021-01-27 03:28

Why is the following not yielding never?

type test = string & {name: string}

Is it because primitive types are not nominal?

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