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
astro
1.0.0-beta.27
None
pnpm
Zorin OS
The API Pages Documentation demonstrates the usage of the APIRoute type. But it's not been exported.
APIRoute
But even if I manually export the APIRoute type editing the files inside the astro package, it still doesn't work properly.
Currently, the below code can be used as a workaround:
https://stackblitz.com/edit/github-egzhia?file=src%2Fpages%2Fapi%2Freproduction.ts&on=stackblitz
The text was updated successfully, but these errors were encountered:
Should APIRoute type not be
export declare type APIRoute = (context: APIContext) => EndpointOutput | Response | Promise<EndpointOutput > | Promise<Response>;
It currently doesn't work for async/await functions . are all API methods synchronous by design ?
Sorry, something went wrong.
matthewp
Successfully merging a pull request may close this issue.
What version of
astro
are you using?1.0.0-beta.27
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
Zorin OS
Describe the Bug
The API Pages Documentation demonstrates the usage of the
APIRoute
type. But it's not been exported.But even if I manually export the
APIRoute
type editing the files inside theastro
package, it still doesn't work properly.Currently, the below code can be used as a workaround:
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-egzhia?file=src%2Fpages%2Fapi%2Freproduction.ts&on=stackblitz
Participation
The text was updated successfully, but these errors were encountered: