You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using the @param or @query decorator, a TypeError occurs because const parameterTypes in internals/handler.ts is undefined. This line specifically seems to create the issue:
constparameterTypes: ClassConstructor<any>[]=Reflect.getMetadata('design:paramtypes',target,propertyKey);// Line 70 in handler.ts
To Reproduce
Steps to reproduce the behavior:
run npx create-next-app --ts and enable typescript decorator support
Add this library to an api route with path-to-regexp installed
Have you setup babel or are you using SWC for compilation? I believe the package still relies on the usage of babel to provide the decorators API (legacy)
Have you setup babel or are you using SWC for compilation? I believe the package still relies on the usage of babel to provide the decorators API (legacy)
Describe the bug
When using the @param or @query decorator, a TypeError occurs because
const parameterTypes
ininternals/handler.ts
is undefined. This line specifically seems to create the issue:To Reproduce
Steps to reproduce the behavior:
npx create-next-app --ts
and enable typescript decorator support@storyofams/next-api-decorators/dist/internals/handler.js
Expected behavior
The
parameterTypes
should not be undefined.Desktop (please complete the following information):
Additional context
Everything works without using the Param or Query decorators.
The text was updated successfully, but these errors were encountered: