In the following example there is a function test that should only accept an instance of the class C<string,number>, but when passing C<boolean,boolean> it doesn't give an error. Why is that, and how could I make a constraint so that it fails under these circumstances? It should only accept C<string,number>.
class C<T1,T2> {}
const a = new C<string,number>()
const b = new C<boolean,boolean>()
function test(p:C<string,number>) {}
test(a)
test(b) // not failing - why?