Closed Howard-Lam-UnitedVanning closed 2 weeks ago
It looks like this is a question rather than a bug report. This issue tracker is for tracking bugs and active work on TypeScript itself, rather than a general forum for programmers using TypeScript to get help or ask questions.
You can ask questions on sites like Stack Overflow. We are not able to provide one-on-one support on the issue tracker. Please read the issue template carefully - it has important information on what kinds of reports can be acted on here, as well as links to useful TypeScript resources. Thanks!
It looks like this is a question rather than a bug report. This issue tracker is for tracking bugs and active work on TypeScript itself, rather than a general forum for programmers using TypeScript to get help or ask questions.
You can ask questions on sites like Stack Overflow. We are not able to provide one-on-one support on the issue tracker. Please read the issue template carefully - it has important information on what kinds of reports can be acted on here, as well as links to useful TypeScript resources. Thanks!
It isn't a question but that overload signatures currently must all have the same access level but it was asked before to allow different access level and I'm providing a use case for it.
The original post was closed and I could not reply to it, so I had to reply to it in a new issue.
EDIT: never mind this. Rather than having a new issue as a reply to the original issue, I have posted another feature request here https://github.com/microsoft/TypeScript/issues/58316
Originally posted by @0815fox in https://github.com/microsoft/TypeScript/issues/7577#issuecomment-214605484
If I don't add an extra line
I get the error "Argument of type 'G | Q | null | undefined' is not assignable to parameter of type 'G | null'."
But that function signature should not be ever called from the outside because the function body cannot tell if params is actually a query object if the second input is undefined, which is why I have the restriction on the second overlord. That is why I need protected for the third overload.