We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It outputs:
export const getPathname = (typeSafeUrl: TypeSafePage | TypeSafeApiRoute) => string; export const getRoute = (typeSafeUrl: TypeSafePage | TypeSafeApiRoute) => string;
This results in the compiler thinking that this is a function that returns any, because no variable called string exists.
any
string
What you really want is
export const getPathname: (typeSafeUrl: TypeSafePage | TypeSafeApiRoute) => string; export const getRoute: (typeSafeUrl: TypeSafePage | TypeSafeApiRoute) => string;
note that the = is a :
=
:
The text was updated successfully, but these errors were encountered:
Oh yeah, nice one! And thanks for the thorough explanation :)
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
It outputs:
This results in the compiler thinking that this is a function that returns
any
, because no variable calledstring
exists.What you really want is
note that the
=
is a:
The text was updated successfully, but these errors were encountered: