New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error TS2385: Overload signatures must all be public, private or protected. #58303
Comments
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 #58316 |
Originally posted by @0815fox in #7577 (comment)
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.
The text was updated successfully, but these errors were encountered: