class A { constructor(public a1: string) { } } function foo(x = new A(123)) { //should error, 123 is not string }}