interface Arg = {arg: {}}
function test(**arg: Arg**) {}
{} 代表什么类型
看到过的一些写法
- type Test = {} | number
- interface Test<T = {}>{}
...
疑惑
- 代表所有类型,应该为 any
- 代表非原始类型,应该为 object
奇怪的地方 测试了一下
- 能代表除了 null,undefined, void 之外的类型。
- 在 TS3.0 以前的文档里面没有找到使用过的地方,3.0 只是使用没有说明。
问题
{} 代表了什么类型,有啥文档贴一下