TypeScript/tests/cases/compiler/methodChainError.ts
Titian Cernicova-Dragomir e4bca9649a Improved error spans for call errors:
1. When calling a non-callable expression the error span is on the call target not on the whole call
2. When calling a method, the error for overload resolution now includes the arguments (this was previously regressed by #31414)
2019-06-28 23:53:47 +03:00

17 lines
255 B
TypeScript

class Builder {
notMethod: string
method(param: string): Builder {
return this;
}
}
new Builder()
.method("a")
.method()
.method("a");
new Builder()
.method("a")
.notMethod()
.method("a");