typescript如何实现有条件的可选属性?

```javascript
interface Test {
a?:boolean;
b?:any
}
```
a、b默认都可选,但当a有值时,让b成为必填项。
应该如何实现?
`````````
展开
9