我对Typescript的类型系统有个问题。有人能帮我吗?demo({ xx: 11, yy: 22 }); // why do I not get
// a Typescript compile-time我预计最后一条语句demo({ xx: 11, yy: 22 })会产生编译时错误。但typescript转译器似乎认为这没问题。为什么?如
在此代码中,v1类型为BehaviorSubject<string | number>,v2类型为{}。我想要那种类型的v1 be BehaviorSubject<string>和v2 be { a: number, b: number }。 }let v1 = test.prop('');
let v2 = test.p